feat: Make GUC names for headers, cookies and jwt claims compatible with PostgreSQL v14

Getting the value for a header GUC on PostgreSQL v14 is done using `current_setting('request.headers')::json->>'name-of-header'` and in a similar way for `request.cookies` and `request.jwt.claims`

PostgreSQL versions below 14 can opt in to the new JSON GUCs by setting the `db-use-legacy-gucs` config option to false (true by default)
This commit is contained in:
laurenceisla
2021-10-12 12:58:52 -05:00
committed by GitHub
parent ee56dd5db1
commit 627c3c34b7
27 changed files with 250 additions and 34 deletions
+4 -1
View File
@@ -41,13 +41,16 @@ jobs:
- name: Install testing scripts
run: nix-env -f default.nix -iA tests withTools
- name: Run coverage (IO tests and Spec tests against PostgreSQL 13)
- name: Run coverage (IO tests and Spec tests against PostgreSQL 14)
run: postgrest-coverage
- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage/codecov.json
- name: Run the spec tests against PostgreSQL 13
if: always()
run: postgrest-with-postgresql-13 postgrest-test-spec
- name: Run the spec tests against PostgreSQL 12
if: always()
run: postgrest-with-postgresql-12 postgrest-test-spec