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)
18 lines
484 B
Nix
18 lines
484 B
Nix
self: super:
|
|
# Overlay that adds future versions of PostgreSQL that are supported by
|
|
# PostgREST.
|
|
{
|
|
postgresql_14 =
|
|
let
|
|
rev = "76b1e16c6659ccef7187ca69b287525fea133244";
|
|
tarballHash = "1vsahpcx80k2bgslspb0sa6j4bmhdx77sw6la455drqcrqhdqj6a";
|
|
|
|
pinnedPkgs =
|
|
builtins.fetchTarball {
|
|
url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz";
|
|
sha256 = tarballHash;
|
|
};
|
|
in
|
|
(import pinnedPkgs { }).pkgs.postgresql_14;
|
|
}
|