From dcffc02b4ed9e0c69e3c516859c3c5bc1d891be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 7 Jul 2025 21:18:12 +0200 Subject: [PATCH 01/52] chore: fix missing required `teams` meta attribute --- nix/postgresql/generic.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index ea67cbc91..9bf3f9012 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -344,6 +344,7 @@ let description = "Powerful, open source object-relational database system"; license = licenses.postgresql; changelog = "https://www.postgresql.org/docs/release/${finalAttrs.version}/"; + teams = [ ]; maintainers = with maintainers; [ thoughtpolice danbst From 0b6ba7de335afda0ea7bfec2b170de70f2538168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 7 Jul 2025 21:19:07 +0200 Subject: [PATCH 02/52] chore: update old (unsupported) version of nix used in script --- nix/packages/sync-exts-versions.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/packages/sync-exts-versions.nix b/nix/packages/sync-exts-versions.nix index d76e66553..02fa3deaa 100644 --- a/nix/packages/sync-exts-versions.nix +++ b/nix/packages/sync-exts-versions.nix @@ -11,7 +11,7 @@ runCommand "sync-exts-versions" { } '' --subst-var-by 'YQ' '${yq}/bin/yq' \ --subst-var-by 'JQ' '${jq}/bin/jq' \ --subst-var-by 'NIX_EDITOR' '${nix-editor.packages.nix-editor}/bin/nix-editor' \ - --subst-var-by 'NIXPREFETCHURL' '${nixVersions.nix_2_20}/bin/nix-prefetch-url' \ - --subst-var-by 'NIX' '${nixVersions.nix_2_20}/bin/nix' + --subst-var-by 'NIXPREFETCHURL' '${nixVersions.nix_2_29}/bin/nix-prefetch-url' \ + --subst-var-by 'NIX' '${nixVersions.nix_2_29}/bin/nix' chmod +x $out/bin/sync-exts-versions '' From c56c04ab31a6689e8a6769ceaafb330d4b1bd02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 7 Jul 2025 21:19:50 +0200 Subject: [PATCH 03/52] fix: overlay and use our `buildPgrxExtension` function These overlay packages will be removed once the extensions are updated to use the new `buildPgrxExtension` function. --- nix/cargo-pgrx/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/cargo-pgrx/default.nix b/nix/cargo-pgrx/default.nix index 86dfa4c19..97b534e95 100644 --- a/nix/cargo-pgrx/default.nix +++ b/nix/cargo-pgrx/default.nix @@ -73,17 +73,17 @@ in cargo-pgrx_0_12_6 = mkCargoPgrx { version = "0.12.6"; hash = "sha256-7aQkrApALZe6EoQGVShGBj0UIATnfOy2DytFj9IWdEA="; - cargoHash = "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w="; + cargoHash = "sha256-pnMxWWfvr1/AEp8DvG4awig8zjdHizJHoZ5RJA8CL08="; }; cargo-pgrx_0_12_9 = mkCargoPgrx { version = "0.12.9"; hash = "sha256-aR3DZAjeEEAjLQfZ0ZxkjLqTVMIEbU0UiZ62T4BkQq8="; - cargoHash = "sha256-KTKcol9qSNLQZGW32e6fBb6cPkUGItknyVpLdBYqrBY="; + cargoHash = "sha256-yZpD3FriL9UbzRtdFkfIfFfYIrRPYxr/lZ5rb0YBTPc="; }; cargo-pgrx_0_14_3 = mkCargoPgrx { version = "0.14.3"; hash = "sha256-3TsNpEqNm3Uol5XPW1i0XEbP2fF2+RKB2d7lO6BDnvQ="; - cargoHash = "sha256-Ny7j56pwB+2eEK62X0nWfFKQy5fBz+Q1oyvecivxLkk="; + cargoHash = "sha256-LZUXhjMxkBs3O5feH4X5NQC7Qk4Ja6M5+sAYaSCikrY="; }; inherit mkCargoPgrx; } From c317e38743cf2d210b16932d275f99450493dab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 7 Jul 2025 21:22:47 +0200 Subject: [PATCH 04/52] chore: fix formatting --- nix/packages/lib.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nix/packages/lib.nix b/nix/packages/lib.nix index cf541913d..60ae45b27 100644 --- a/nix/packages/lib.nix +++ b/nix/packages/lib.nix @@ -129,13 +129,11 @@ chmod 644 $out/etc/postgresql/pg_hba.conf substitute ${../tools/run-server.sh.in} $out/bin/start-postgres-server \ - ${ - builtins.concatStringsSep " " ( - builtins.attrValues ( - builtins.mapAttrs (name: value: "--subst-var-by '${name}' '${value}'") substitutions - ) + ${builtins.concatStringsSep " " ( + builtins.attrValues ( + builtins.mapAttrs (name: value: "--subst-var-by '${name}' '${value}'") substitutions ) - } + )} chmod +x $out/bin/start-postgres-server ''; } From f83dcb149572522ef9e1af01a82ba21f48c548df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 7 Jul 2025 21:17:11 +0200 Subject: [PATCH 05/52] chore: replace (deprecated) `substituteAll` by `replaceVars` --- nix/postgresql/generic.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 9bf3f9012..c558658ba 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -21,6 +21,7 @@ let libxml2, tzdata, libkrb5, + replaceVars, darwin, linux-pam, #orioledb specific @@ -192,7 +193,10 @@ let ./patches/paths-for-split-outputs.patch ./patches/specify_pkglibdir_at_runtime.patch ./patches/paths-with-postgresql-suffix.patch - ./patches/locale-binary-path.patch + + (replaceVars ./patches/locale-binary-path.patch { + locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; + }) ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 From 74c98c2f9922a3155186e4dde07f1b34a1acedda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 7 Jul 2025 21:16:39 +0200 Subject: [PATCH 06/52] chore: update (and refactor) flake inputs --- flake.lock | 43 ++++++++++++++++++++----------------------- flake.nix | 30 +++++++++++++++--------------- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/flake.lock b/flake.lock index a28edf942..be3c879f3 100644 --- a/flake.lock +++ b/flake.lock @@ -21,8 +21,8 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1749398372, - "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", @@ -60,8 +60,8 @@ "systems": "systems" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", @@ -212,11 +212,11 @@ ] }, "locked": { - "lastModified": 1708764364, - "narHash": "sha256-+pOtDvmuVTg0Gi58hKDUyrNla5NbyUvt3Xs3gLR0Fws=", + "lastModified": 1752002763, + "narHash": "sha256-JYAkdZvpdSx9GUoHPArctYMypSONob4DYKRkOubUWtY=", "owner": "nlewo", "repo": "nix2container", - "rev": "c891f90d2e3c48a6b33466c96e4851e0fc0cf455", + "rev": "4f2437f6a1844b843b380d483087ae6d461240ee", "type": "github" }, "original": { @@ -227,18 +227,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712666087, - "narHash": "sha256-WwjUkWsjlU8iUImbivlYxNyMB1L5YVqE8QotQdL9jWc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a76c4553d7e741e17f289224eda135423de0491d", - "type": "github" + "lastModified": 1763966396, + "narHash": "sha256-r3JipNKafTOQfXuqez57wro7KnwNsqvMFGQ7b48pcfo=", + "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre901419.5ae3b07d8d65/nixexprs.tar.xz?lastModified=1763966396&rev=5ae3b07d8d6527c42f17c876e404993199144b6a" }, "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, "nixpkgs-go124": { @@ -259,11 +256,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1750555020, - "narHash": "sha256-/MjivcZIz8dyLOTFdJzS5Yazt2QCePQBh8uZooODaYw=", + "lastModified": 1751159883, + "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "6fb7349157ee1bffd053b1fdd454aa74ff7b4aee", + "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", "type": "github" }, "original": { @@ -274,11 +271,11 @@ }, "nixpkgs-pgbackrest": { "locked": { - "lastModified": 1761373498, - "narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=", + "lastModified": 1764072303, + "narHash": "sha256-R8WxY9F5HNSZstrlsTqxbDMpq7qHzO6TW1uUew849dQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce", + "rev": "798ce8bfd0567bbd12ee633a88e53737969ec7d9", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index efd0b7e9e..85d13ded6 100644 --- a/flake.nix +++ b/flake.nix @@ -7,28 +7,28 @@ ]; }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; flake-utils.url = "github:numtide/flake-utils"; - nix2container.url = "github:nlewo/nix2container"; - nix2container.inputs.nixpkgs.follows = "nixpkgs"; - nix2container.inputs.flake-utils.follows = "flake-utils"; - nix-editor.url = "github:snowfallorg/nix-editor"; - nix-editor.inputs.utils.follows = "flake-utils"; + git-hooks.inputs.nixpkgs.follows = "nixpkgs"; + git-hooks.url = "github:cachix/git-hooks.nix"; nix-editor.inputs.nixpkgs.follows = "nixpkgs"; - rust-overlay.url = "github:oxalica/rust-overlay"; - rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; - nix-fast-build.url = "github:Mic92/nix-fast-build"; + nix-editor.inputs.utils.follows = "flake-utils"; + nix-editor.url = "github:snowfallorg/nix-editor"; + nix-eval-jobs.url = "github:nix-community/nix-eval-jobs"; nix-fast-build.inputs.flake-parts.follows = "flake-parts"; nix-fast-build.inputs.nixpkgs.follows = "nixpkgs"; nix-fast-build.inputs.treefmt-nix.follows = "treefmt-nix"; - flake-parts.url = "github:hercules-ci/flake-parts"; - treefmt-nix.url = "github:numtide/treefmt-nix"; - treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; - git-hooks.url = "github:cachix/git-hooks.nix"; - git-hooks.inputs.nixpkgs.follows = "nixpkgs"; + nix-fast-build.url = "github:Mic92/nix-fast-build"; + nix2container.inputs.flake-utils.follows = "flake-utils"; + nix2container.inputs.nixpkgs.follows = "nixpkgs"; + nix2container.url = "github:nlewo/nix2container"; nixpkgs-go124.url = "github:Nixos/nixpkgs/d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0"; nixpkgs-pgbackrest.url = "github:nixos/nixpkgs/nixos-unstable-small"; - nix-eval-jobs.url = "github:nix-community/nix-eval-jobs"; + nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; + rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; + rust-overlay.url = "github:oxalica/rust-overlay"; + treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + treefmt-nix.url = "github:numtide/treefmt-nix"; }; outputs = From 1558755ceb0a334945cde479ab714bb8d2f07da8 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Fri, 11 Jul 2025 19:12:21 +0200 Subject: [PATCH 07/52] chore: bump `pgrouting` version to 3.8.0 The previously used version was failing to build: /build/source/src/common/get_check_data.c: In function 'pgr_SPI_getText': /build/source/src/common/get_check_data.c:307:28: error: passing argument 1 of 'DatumGetCString' makes integer from pointer without a cast [-Wint-conversion] 307 | return DatumGetCString(SPI_getvalue(*tuple, *tupdesc, info.colNumber)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | char * In file included from /build/source/include/c_common/postgres_connection.h:29, from /build/source/src/common/get_check_data.c:27: /nix/store/nn6vpjqlsxxmynwcrsib9agb3hpr5cqj-postgresql-17.4/include/server/postgres.h:335:23: note: expected 'Datum' {aka 'long unsigned int'} but argument is of type 'char *' 335 | DatumGetCString(Datum X) | ~~~~~~^ make[2]: *** [src/common/CMakeFiles/common.dir/build.make:149: src/common/CMakeFiles/common.dir/get_check_data.c.o] Error 1 --- nix/ext/pgrouting.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting.nix index 48833791e..da3e8691c 100644 --- a/nix/ext/pgrouting.nix +++ b/nix/ext/pgrouting.nix @@ -10,6 +10,10 @@ }: let pname = "pgrouting"; +<<<<<<< HEAD +======= + version = "3.8.0"; +>>>>>>> 054e04ac (chore: bump `pgrouting` version to 3.8.0) # Load version configuration from external file allVersions = (builtins.fromJSON (builtins.readFile ./versions.json)).${pname}; @@ -122,10 +126,19 @@ buildEnv { "/share/postgresql/extension" ]; +<<<<<<< HEAD postBuild = '' #Verify all expected library files are present expectedFiles=${toString (numberOfVersions + 1)} actualFiles=$(ls -l $out/lib/lib${pname}*${postgresql.dlSuffix} | wc -l) +======= + src = fetchFromGitHub { + owner = "pgRouting"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Lvf7TQ3GywbzZmcd9wi3s8I5sCXIQAPeXNTRk/J46to="; + }; +>>>>>>> 054e04ac (chore: bump `pgrouting` version to 3.8.0) if [[ "$actualFiles" != "$expectedFiles" ]]; then echo "Error: Expected $expectedFiles library files, found $actualFiles" From 3d802edaee6c5eb2b29a3a872a661ed9b8ff9aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Fri, 18 Jul 2025 17:51:01 +0200 Subject: [PATCH 08/52] fix: backport tzdata fixes for postgresql 15 This was discussed upstream here: https://postgr.es/m/0a997455-5aba-4cf2-a354-d26d8bcbfae6%40technowledgy.de Also applied by nixpkgs here: https://github.com/NixOS/nixpkgs/pull/342026 --- nix/postgresql/generic.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index c558658ba..6cdccfa6b 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -7,6 +7,7 @@ let stdenv, lib, fetchurl, + fetchpatch, makeWrapper, glibc, zlib, @@ -198,6 +199,20 @@ let locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; }) ] + ++ lib.optionals (olderThan "17") [ + # back port changes related to tzdata release 2024b + (fetchpatch ({ + url = "https://github.com/postgres/postgres/commit/b27622c90869aab63cfe22159a459c57768b0fa4.patch"; + hash = "sha256-7G+BkJULhyx6nlMEjClcr2PJg6awgymZHr2JgGhXanA="; + excludes = [ "doc/*" ]; + })) + # back port changes related to tzdata release 2025a + (fetchpatch ({ + url = "https://github.com/postgres/postgres/commit/aac0384975ff1129557cd2158fab4656f933cdc8.patch"; + hash = "sha256-4Aua4QJhCS9B0zegQ9I6Us5QfX7GuRUilnkmOpSTUUw="; + excludes = [ "doc/*" ]; + })) + ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) From db119ff123de4513059646d15945a9fb2fbb2f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 21 Jul 2025 11:29:24 +0200 Subject: [PATCH 09/52] fix: plv8 3.1 requires older v8 We cannot use nodejs.libv8 as it is too new for plv8 3.1. We will be able to use it with plv8 3.2. --- nix/ext/pgrouting.nix | 13 ---- nix/ext/plv8.nix | 162 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+), 13 deletions(-) create mode 100644 nix/ext/plv8.nix diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting.nix index da3e8691c..48833791e 100644 --- a/nix/ext/pgrouting.nix +++ b/nix/ext/pgrouting.nix @@ -10,10 +10,6 @@ }: let pname = "pgrouting"; -<<<<<<< HEAD -======= - version = "3.8.0"; ->>>>>>> 054e04ac (chore: bump `pgrouting` version to 3.8.0) # Load version configuration from external file allVersions = (builtins.fromJSON (builtins.readFile ./versions.json)).${pname}; @@ -126,19 +122,10 @@ buildEnv { "/share/postgresql/extension" ]; -<<<<<<< HEAD postBuild = '' #Verify all expected library files are present expectedFiles=${toString (numberOfVersions + 1)} actualFiles=$(ls -l $out/lib/lib${pname}*${postgresql.dlSuffix} | wc -l) -======= - src = fetchFromGitHub { - owner = "pgRouting"; - repo = pname; - rev = "v${version}"; - hash = "sha256-Lvf7TQ3GywbzZmcd9wi3s8I5sCXIQAPeXNTRk/J46to="; - }; ->>>>>>> 054e04ac (chore: bump `pgrouting` version to 3.8.0) if [[ "$actualFiles" != "$expectedFiles" ]]; then echo "Error: Expected $expectedFiles library files, found $actualFiles" diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix new file mode 100644 index 000000000..c0d5e77b6 --- /dev/null +++ b/nix/ext/plv8.nix @@ -0,0 +1,162 @@ +{ + stdenv, + lib, + fetchFromGitHub, + perl, + postgresql, + # For passthru test on various systems, and local development on macos + # not we are not currently using passthru tests but retaining for possible contrib + # to nixpkgs + clang, + xcbuild, + darwin, + patchelf, +}: +let + # plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8) + node_pkgs = import (fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz"; + sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v"; + }) { system = stdenv.system; }; + inherit (node_pkgs) v8; +in +stdenv.mkDerivation (finalAttrs: { + pname = "plv8"; + version = "3.1.10"; + + src = fetchFromGitHub { + owner = "plv8"; + repo = "plv8"; + rev = "v${finalAttrs.version}"; + hash = "sha256-g1A/XPC0dX2360Gzvmo9/FSQnM6Wt2K4eR0pH0p9fz4="; + }; + + patches = [ + # Allow building with system v8. + # https://github.com/plv8/plv8/pull/505 (rejected) + ./0001-build-Allow-using-V8-from-system.patch + ]; + + nativeBuildInputs = + [ perl ] + ++ lib.optionals stdenv.isDarwin [ + clang + xcbuild + ]; + + buildInputs = + [ + v8 + postgresql + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Kerberos + ]; + + buildFlags = [ "all" ]; + + makeFlags = + [ + # Nixpkgs build a v8 monolith instead of separate v8_libplatform. + "USE_SYSTEM_V8=1" + "V8_OUTDIR=${v8}/lib" + "PG_CONFIG=${postgresql}/bin/pg_config" + ] + ++ lib.optionals stdenv.isDarwin [ + "CC=${clang}/bin/clang" + "CXX=${clang}/bin/clang++" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; + + NIX_LDFLAGS = ( + lib.optionals stdenv.isDarwin [ + "-L${postgresql}/lib" + "-L${v8}/lib" + "-lv8_monolith" + "-lpq" + "-lpgcommon" + "-lpgport" + "-F${darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks" + "-framework" + "CoreFoundation" + "-F${darwin.apple_sdk.frameworks.Kerberos}/Library/Frameworks" + "-framework" + "Kerberos" + "-undefined" + "dynamic_lookup" + "-flat_namespace" + ] + ); + + installFlags = [ + # PGXS only supports installing to postgresql prefix so we need to redirect this + "DESTDIR=${placeholder "out"}" + ]; + + # No configure script. + dontConfigure = true; + + postPatch = '' + patchShebangs ./generate_upgrade.sh + substituteInPlace generate_upgrade.sh \ + --replace " 2.3.10 " " 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.15 " + + ${lib.optionalString stdenv.isDarwin '' + # Replace g++ with clang++ in Makefile + sed -i 's/g++/clang++/g' Makefile + ''} + ''; + + postInstall = '' + # Move the redirected to proper directory. + # There appear to be no references to the install directories + # so changing them does not cause issues. + mv "$out/nix/store"/*/* "$out" + rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix" + + # Handle different PostgreSQL versions + if [ "${lib.versions.major postgresql.version}" = "15" ]; then + mv "$out/lib/plv8-${finalAttrs.version}.so" "$out/lib/plv8.so" + ln -s "$out/lib/plv8.so" "$out/lib/plv8-${finalAttrs.version}.so" + sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plv8.control" + sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plcoffee.control" + sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plls.control" + + ${lib.optionalString stdenv.isDarwin '' + install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8.so + install_name_tool -add_rpath "${postgresql}/lib" $out/lib/plv8.so + install_name_tool -add_rpath "${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so + install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8.so + ''} + + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so + ''} + else + ${lib.optionalString stdenv.isDarwin '' + install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + install_name_tool -add_rpath "${postgresql}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + install_name_tool -add_rpath "${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + ''} + + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + ''} + fi + ''; + + meta = with lib; { + description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL"; + homepage = "https://plv8.github.io/"; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + license = licenses.postgresql; + }; +}) From eeaac607766b9ee17a30756865071250860b913e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Sun, 10 Aug 2025 23:42:47 +0200 Subject: [PATCH 10/52] chore: update fmt --- nix/ext/gdal.nix | 17 +- nix/ext/pgroonga.nix | 96 ++++++++++ nix/ext/pgrouting.nix | 22 +++ nix/ext/plv8.nix | 55 +++--- nix/ext/postgis.nix | 23 +++ nix/packages/groonga/default.nix | 29 ++- nix/packages/lib.nix | 3 +- nix/postgresql/generic.nix | 306 +++++++++++++++---------------- 8 files changed, 342 insertions(+), 209 deletions(-) create mode 100644 nix/ext/pgroonga.nix diff --git a/nix/ext/gdal.nix b/nix/ext/gdal.nix index 739f7e432..c4dba3e69 100644 --- a/nix/ext/gdal.nix +++ b/nix/ext/gdal.nix @@ -47,15 +47,14 @@ stdenv.mkDerivation rec { zlib ]; - cmakeFlags = - [ - "-DGDAL_USE_INTERNAL_LIBS=OFF" - "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include" - "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}" - "-DBUILD_PYTHON_BINDINGS=OFF" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ] - ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; + cmakeFlags = [ + "-DGDAL_USE_INTERNAL_LIBS=OFF" + "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include" + "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DBUILD_PYTHON_BINDINGS=OFF" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ] + ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; enableParallelBuilding = true; diff --git a/nix/ext/pgroonga.nix b/nix/ext/pgroonga.nix new file mode 100644 index 000000000..5d73d9ef8 --- /dev/null +++ b/nix/ext/pgroonga.nix @@ -0,0 +1,96 @@ +{ + lib, + stdenv, + fetchurl, + pkg-config, + postgresql, + msgpack-c, + mecab, + makeWrapper, + xxHash, + supabase-groonga, +}: +stdenv.mkDerivation rec { + pname = "pgroonga"; + version = "3.2.5"; + src = fetchurl { + url = "https://packages.groonga.org/source/${pname}/${pname}-${version}.tar.gz"; + sha256 = "sha256-GM9EOQty72hdE4Ecq8jpDudhZLiH3pP9ODLxs8DXcSY="; + }; + + nativeBuildInputs = [ + pkg-config + makeWrapper + ]; + + buildInputs = [ + postgresql + msgpack-c + supabase-groonga + mecab + ] + ++ lib.optionals stdenv.isDarwin [ xxHash ]; + + propagatedBuildInputs = [ supabase-groonga ]; + configureFlags = [ + "--with-mecab=${mecab}" + "--enable-mecab" + "--with-groonga=${supabase-groonga}" + "--with-groonga-plugin-dir=${supabase-groonga}/lib/groonga/plugins" + ]; + + makeFlags = [ + "HAVE_MSGPACK=1" + "MSGPACK_PACKAGE_NAME=msgpack-c" + "HAVE_MECAB=1" + ]; + + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin ( + builtins.concatStringsSep " " [ + "-Wno-error=incompatible-function-pointer-types" + "-Wno-error=format" + "-Wno-format" + "-I${supabase-groonga}/include/groonga" + "-I${xxHash}/include" + "-DPGRN_VERSION=\"${version}\"" + ] + ); + + preConfigure = '' + export GROONGA_LIBS="-L${supabase-groonga}/lib -lgroonga" + export GROONGA_CFLAGS="-I${supabase-groonga}/include" + export MECAB_CONFIG="${mecab}/bin/mecab-config" + ${lib.optionalString stdenv.isDarwin '' + export CPPFLAGS="-I${supabase-groonga}/include/groonga -I${xxHash}/include -DPGRN_VERSION=\"${version}\"" + export CFLAGS="-I${supabase-groonga}/include/groonga -I${xxHash}/include -DPGRN_VERSION=\"${version}\"" + export PG_CPPFLAGS="-Wno-error=incompatible-function-pointer-types -Wno-error=format" + ''} + ''; + + installPhase = '' + mkdir -p $out/lib $out/share/postgresql/extension $out/bin + install -D pgroonga${postgresql.dlSuffix} -t $out/lib/ + install -D pgroonga.control -t $out/share/postgresql/extension + install -D data/pgroonga-*.sql -t $out/share/postgresql/extension + install -D pgroonga_database${postgresql.dlSuffix} -t $out/lib/ + install -D pgroonga_database.control -t $out/share/postgresql/extension + install -D data/pgroonga_database-*.sql -t $out/share/postgresql/extension + + echo "Debug: Groonga plugins directory contents:" + ls -l ${supabase-groonga}/lib/groonga/plugins/tokenizers/ + ''; + + meta = with lib; { + description = "A PostgreSQL extension to use Groonga as the index"; + longDescription = '' + PGroonga is a PostgreSQL extension to use Groonga as the index. + PostgreSQL supports full text search against languages that use only alphabet and digit. + It means that PostgreSQL doesn't support full text search against Japanese, Chinese and so on. + You can use super fast full text search feature against all languages by installing PGroonga into your PostgreSQL. + ''; + homepage = "https://pgroonga.github.io/"; + changelog = "https://github.com/pgroonga/pgroonga/releases/tag/${version}"; + license = licenses.postgresql; + platforms = postgresql.meta.platforms; + }; +} diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting.nix index 48833791e..caa71480a 100644 --- a/nix/ext/pgrouting.nix +++ b/nix/ext/pgrouting.nix @@ -127,12 +127,34 @@ buildEnv { expectedFiles=${toString (numberOfVersions + 1)} actualFiles=$(ls -l $out/lib/lib${pname}*${postgresql.dlSuffix} | wc -l) +<<<<<<< HEAD if [[ "$actualFiles" != "$expectedFiles" ]]; then echo "Error: Expected $expectedFiles library files, found $actualFiles" echo "Files found:" ls -la $out/lib/*${postgresql.dlSuffix} || true exit 1 fi +======= + #disable compile time warnings for incompatible pointer types only on macos and pg16 + NIX_CFLAGS_COMPILE = lib.optionalString ( + stdenv.isDarwin && lib.versionAtLeast postgresql.version "16" + ) "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types"; + + cmakeFlags = [ + "-DPOSTGRESQL_VERSION=${postgresql.version}" + ] + ++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [ + "-DCMAKE_MACOSX_RPATH=ON" + "-DCMAKE_SHARED_MODULE_SUFFIX=.dylib" + "-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib" + ]; + + preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") '' + export DLSUFFIX=.dylib + export CMAKE_SHARED_LIBRARY_SUFFIX=.dylib + export CMAKE_SHARED_MODULE_SUFFIX=.dylib + export MACOSX_RPATH=ON +>>>>>>> 4847adac (chore: update fmt) ''; passthru = { diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix index c0d5e77b6..a02f30be8 100644 --- a/nix/ext/plv8.nix +++ b/nix/ext/plv8.nix @@ -37,38 +37,37 @@ stdenv.mkDerivation (finalAttrs: { ./0001-build-Allow-using-V8-from-system.patch ]; - nativeBuildInputs = - [ perl ] - ++ lib.optionals stdenv.isDarwin [ - clang - xcbuild - ]; + nativeBuildInputs = [ + perl + ] + ++ lib.optionals stdenv.isDarwin [ + clang + xcbuild + ]; - buildInputs = - [ - v8 - postgresql - ] - ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.Kerberos - ]; + buildInputs = [ + v8 + postgresql + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Kerberos + ]; buildFlags = [ "all" ]; - makeFlags = - [ - # Nixpkgs build a v8 monolith instead of separate v8_libplatform. - "USE_SYSTEM_V8=1" - "V8_OUTDIR=${v8}/lib" - "PG_CONFIG=${postgresql}/bin/pg_config" - ] - ++ lib.optionals stdenv.isDarwin [ - "CC=${clang}/bin/clang" - "CXX=${clang}/bin/clang++" - "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; + makeFlags = [ + # Nixpkgs build a v8 monolith instead of separate v8_libplatform. + "USE_SYSTEM_V8=1" + "V8_OUTDIR=${v8}/lib" + "PG_CONFIG=${postgresql}/bin/pg_config" + ] + ++ lib.optionals stdenv.isDarwin [ + "CC=${clang}/bin/clang" + "CXX=${clang}/bin/clang++" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; NIX_LDFLAGS = ( lib.optionals stdenv.isDarwin [ diff --git a/nix/ext/postgis.nix b/nix/ext/postgis.nix index cdf48fb24..62de91a10 100644 --- a/nix/ext/postgis.nix +++ b/nix/ext/postgis.nix @@ -48,9 +48,32 @@ let "postgis_topology" ]; +<<<<<<< HEAD sqlExtensions = [ "address_standardizer_data_us" "postgis_tiger_geocoder" +======= + src = fetchurl { + url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"; + sha256 = "sha256-UHJKDd5JrcJT5Z4CTYsY/va+ToU0GUPG1eHhuXTkP84="; + }; + + buildInputs = [ + libxml2 + postgresql + geos + proj + gdal + json_c + protobufc + pcre2.dev + sfcgal + ] + ++ lib.optional stdenv.isDarwin libiconv; + nativeBuildInputs = [ + perl + pkg-config +>>>>>>> 4847adac (chore: update fmt) ]; # Build function for individual versions diff --git a/nix/packages/groonga/default.nix b/nix/packages/groonga/default.nix index bef491109..c6d734db6 100644 --- a/nix/packages/groonga/default.nix +++ b/nix/packages/groonga/default.nix @@ -36,21 +36,20 @@ stdenv.mkDerivation (finalAttrs: { pkg-config makeWrapper ]; - buildInputs = - [ - rapidjson - xxHash - zstd - mecab - kytea - msgpack-c - ] - ++ lib.optionals lz4Support [ lz4 ] - ++ lib.optional zlibSupport [ zlib ] - ++ lib.optionals suggestSupport [ - zeromq - libevent - ]; + buildInputs = [ + rapidjson + xxHash + zstd + mecab + kytea + msgpack-c + ] + ++ lib.optionals lz4Support [ lz4 ] + ++ lib.optional zlibSupport [ zlib ] + ++ lib.optionals suggestSupport [ + zeromq + libevent + ]; cmakeFlags = [ "-DWITH_MECAB=ON" "-DMECAB_DICDIR=${mecab-naist-jdic}/lib/mecab/dic/naist-jdic" diff --git a/nix/packages/lib.nix b/nix/packages/lib.nix index 60ae45b27..ef8f64069 100644 --- a/nix/packages/lib.nix +++ b/nix/packages/lib.nix @@ -100,7 +100,8 @@ PGBOUNCER_AUTH_SCHEMA_SQL = "${paths.pgbouncerAuthSchemaSql}"; STAT_EXTENSION_SQL = "${paths.statExtensionSql}"; CURRENT_SYSTEM = "${system}"; - } // extraSubstitutions; # Merge in any extra substitutions + } + // extraSubstitutions; # Merge in any extra substitutions in pkgs.runCommand name { diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 6cdccfa6b..c29ae9646 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -115,43 +115,41 @@ let ]; setOutputFlags = false; # $out retains configureFlags :-/ - buildInputs = - [ - zlib - readline - openssl - (libxml2.override { python = python3; }) - icu - ] - ++ lib.optionals (olderThan "13") [ libxcrypt ] - ++ lib.optionals jitSupport [ llvmPackages.llvm ] - ++ lib.optionals lz4Enabled [ lz4 ] - ++ lib.optionals zstdEnabled [ zstd ] - ++ lib.optionals systemdSupport' [ systemd ] - ++ lib.optionals pythonSupport [ python3 ] - ++ lib.optionals gssSupport [ libkrb5 ] - ++ lib.optionals stdenv'.isLinux [ linux-pam ] - ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] - ++ lib.optionals (isOrioleDB || (lib.versionAtLeast version "17")) [ - perl - bison - flex - docbook_xsl - docbook_xml_dtd_45 - docbook_xsl_ns - libxslt - ]; + buildInputs = [ + zlib + readline + openssl + (libxml2.override { python = python3; }) + icu + ] + ++ lib.optionals (olderThan "13") [ libxcrypt ] + ++ lib.optionals jitSupport [ llvmPackages.llvm ] + ++ lib.optionals lz4Enabled [ lz4 ] + ++ lib.optionals zstdEnabled [ zstd ] + ++ lib.optionals systemdSupport' [ systemd ] + ++ lib.optionals pythonSupport [ python3 ] + ++ lib.optionals gssSupport [ libkrb5 ] + ++ lib.optionals stdenv'.isLinux [ linux-pam ] + ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] + ++ lib.optionals (isOrioleDB || (lib.versionAtLeast version "17")) [ + perl + bison + flex + docbook_xsl + docbook_xml_dtd_45 + docbook_xsl_ns + libxslt + ]; - nativeBuildInputs = - [ - makeWrapper - pkg-config - ] - ++ lib.optionals jitSupport [ - llvmPackages.llvm.dev - nukeReferences - patchelf - ]; + nativeBuildInputs = [ + makeWrapper + pkg-config + ] + ++ lib.optionals jitSupport [ + llvmPackages.llvm.dev + nukeReferences + patchelf + ]; enableParallelBuilding = true; @@ -163,63 +161,61 @@ let # Fixed upstream in https://github.com/postgres/postgres/commit/0bc8cebdb889368abdf224aeac8bc197fe4c9ae6 env.NIX_CFLAGS_COMPILE = lib.optionalString (olderThan "13") "-I${libxml2.dev}/include/libxml2"; - configureFlags = - [ - "--with-openssl" - "--with-libxml" - "--with-icu" - "--sysconfdir=/etc" - "--libdir=$(lib)/lib" - "--with-system-tzdata=${tzdata}/share/zoneinfo" - "--enable-debug" - (lib.optionalString systemdSupport' "--with-systemd") - (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") - ] - ++ lib.optionals lz4Enabled [ "--with-lz4" ] - ++ lib.optionals zstdEnabled [ "--with-zstd" ] - ++ lib.optionals gssSupport [ "--with-gssapi" ] - ++ lib.optionals pythonSupport [ "--with-python" ] - ++ lib.optionals jitSupport [ "--with-llvm" ] - ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; - - patches = - [ - ( - if atLeast "16" then - ./patches/relative-to-symlinks-16+.patch - else - ./patches/relative-to-symlinks.patch - ) - ./patches/less-is-more.patch - ./patches/paths-for-split-outputs.patch - ./patches/specify_pkglibdir_at_runtime.patch - ./patches/paths-with-postgresql-suffix.patch - - (replaceVars ./patches/locale-binary-path.patch { - locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; - }) - ] - ++ lib.optionals (olderThan "17") [ - # back port changes related to tzdata release 2024b - (fetchpatch ({ - url = "https://github.com/postgres/postgres/commit/b27622c90869aab63cfe22159a459c57768b0fa4.patch"; - hash = "sha256-7G+BkJULhyx6nlMEjClcr2PJg6awgymZHr2JgGhXanA="; - excludes = [ "doc/*" ]; - })) - # back port changes related to tzdata release 2025a - (fetchpatch ({ - url = "https://github.com/postgres/postgres/commit/aac0384975ff1129557cd2158fab4656f933cdc8.patch"; - hash = "sha256-4Aua4QJhCS9B0zegQ9I6Us5QfX7GuRUilnkmOpSTUUw="; - excludes = [ "doc/*" ]; - })) - ] - ++ lib.optionals stdenv'.hostPlatform.isMusl ( - # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 - map fetchurl (lib.attrValues muslPatches) + configureFlags = [ + "--with-openssl" + "--with-libxml" + "--with-icu" + "--sysconfdir=/etc" + "--libdir=$(lib)/lib" + "--with-system-tzdata=${tzdata}/share/zoneinfo" + "--enable-debug" + (lib.optionalString systemdSupport' "--with-systemd") + (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") + ] + ++ lib.optionals lz4Enabled [ "--with-lz4" ] + ++ lib.optionals zstdEnabled [ "--with-zstd" ] + ++ lib.optionals gssSupport [ "--with-gssapi" ] + ++ lib.optionals pythonSupport [ "--with-python" ] + ++ lib.optionals jitSupport [ "--with-llvm" ] + ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; + + patches = [ + ( + if atLeast "16" then + ./patches/relative-to-symlinks-16+.patch + else + ./patches/relative-to-symlinks.patch ) - ++ lib.optionals stdenv'.isLinux [ - (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) - ]; + ./patches/less-is-more.patch + ./patches/paths-for-split-outputs.patch + ./patches/specify_pkglibdir_at_runtime.patch + ./patches/paths-with-postgresql-suffix.patch + + (replaceVars ./patches/locale-binary-path.patch { + locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; + }) + ] + ++ lib.optionals (olderThan "17") [ + # back port changes related to tzdata release 2024b + (fetchpatch ({ + url = "https://github.com/postgres/postgres/commit/b27622c90869aab63cfe22159a459c57768b0fa4.patch"; + hash = "sha256-7G+BkJULhyx6nlMEjClcr2PJg6awgymZHr2JgGhXanA="; + excludes = [ "doc/*" ]; + })) + # back port changes related to tzdata release 2025a + (fetchpatch ({ + url = "https://github.com/postgres/postgres/commit/aac0384975ff1129557cd2158fab4656f933cdc8.patch"; + hash = "sha256-4Aua4QJhCS9B0zegQ9I6Us5QfX7GuRUilnkmOpSTUUw="; + excludes = [ "doc/*" ]; + })) + ] + ++ lib.optionals stdenv'.hostPlatform.isMusl ( + # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 + map fetchurl (lib.attrValues muslPatches) + ) + ++ lib.optionals stdenv'.isLinux [ + (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) + ]; installTargets = [ "install-world-bin" ]; @@ -238,55 +234,54 @@ let substituteInPlace src/backend/jit/llvm/llvmjit_inline.cpp --replace pkglib_path \"$out/lib\" ''; - postInstall = - '' - moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it - moveToOutput "lib/libpgcommon*.a" "$out" - moveToOutput "lib/libpgport*.a" "$out" - moveToOutput "lib/libecpg*" "$out" - - # Prevent a retained dependency on gcc-wrapper. - substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/ld ld - - if [ -z "''${dontDisableStatic:-}" ]; then - # Remove static libraries in case dynamic are available. - for i in $out/lib/*.a $lib/lib/*.a; do - name="$(basename "$i")" - ext="${stdenv'.hostPlatform.extensions.sharedLibrary}" - if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then - rm "$i" - fi - done - fi - '' - + lib.optionalString jitSupport '' - # Move the bitcode and libllvmjit.so library out of $lib; otherwise, every client that - # depends on libpq.so will also have libLLVM.so in its closure too, bloating it - moveToOutput "lib/bitcode" "$out" - moveToOutput "lib/llvmjit*" "$out" - - # In the case of JIT support, prevent a retained dependency on clang-wrapper - substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang - nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) - - # Stop out depending on the default output of llvm - substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${llvmPackages.llvm.out}/bin "" \ - --replace '$(LLVM_BINPATH)/' "" - - # Stop out depending on the -dev output of llvm - substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ - --replace -I${llvmPackages.llvm.dev}/include "" - - ${lib.optionalString (!stdenv'.isDarwin) '' - # Stop lib depending on the -dev output of llvm - rpath=$(patchelf --print-rpath $out/lib/llvmjit.so) - nuke-refs -e $out $out/lib/llvmjit.so - # Restore the correct rpath - patchelf $out/lib/llvmjit.so --set-rpath "$rpath" - ''} - ''; + postInstall = '' + moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it + moveToOutput "lib/libpgcommon*.a" "$out" + moveToOutput "lib/libpgport*.a" "$out" + moveToOutput "lib/libecpg*" "$out" + + # Prevent a retained dependency on gcc-wrapper. + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/ld ld + + if [ -z "''${dontDisableStatic:-}" ]; then + # Remove static libraries in case dynamic are available. + for i in $out/lib/*.a $lib/lib/*.a; do + name="$(basename "$i")" + ext="${stdenv'.hostPlatform.extensions.sharedLibrary}" + if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then + rm "$i" + fi + done + fi + '' + + lib.optionalString jitSupport '' + # Move the bitcode and libllvmjit.so library out of $lib; otherwise, every client that + # depends on libpq.so will also have libLLVM.so in its closure too, bloating it + moveToOutput "lib/bitcode" "$out" + moveToOutput "lib/llvmjit*" "$out" + + # In the case of JIT support, prevent a retained dependency on clang-wrapper + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang + nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) + + # Stop out depending on the default output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.out}/bin "" \ + --replace '$(LLVM_BINPATH)/' "" + + # Stop out depending on the -dev output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ + --replace -I${llvmPackages.llvm.dev}/include "" + + ${lib.optionalString (!stdenv'.isDarwin) '' + # Stop lib depending on the -dev output of llvm + rpath=$(patchelf --print-rpath $out/lib/llvmjit.so) + nuke-refs -e $out $out/lib/llvmjit.so + # Restore the correct rpath + patchelf $out/lib/llvmjit.so --set-rpath "$rpath" + ''} + ''; postFixup = lib.optionalString (!stdenv'.isDarwin && stdenv'.hostPlatform.libc == "glibc") '' # initdb needs access to "locale" command from glibc. @@ -340,22 +335,21 @@ let postgresql = this; } this.pkgs; - tests = - { - postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { - inherit (stdenv) system; - pkgs = self; - package = this; - }; - pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - } - // lib.optionalAttrs jitSupport { - postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { - inherit (stdenv) system; - pkgs = self; - package = this; - }; + tests = { + postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { + inherit (stdenv) system; + pkgs = self; + package = this; }; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + } + // lib.optionalAttrs jitSupport { + postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; + }; }; meta = with lib; { From 23be2a8fcf918878e11b2b68981ea5f3dd77da85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 21 Jul 2025 11:39:05 +0200 Subject: [PATCH 11/52] chore: update cargo-pgrx 1.14.3 cargo hash --- nix/cargo-pgrx/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/cargo-pgrx/versions.json b/nix/cargo-pgrx/versions.json index 422bd749c..ff95da2da 100644 --- a/nix/cargo-pgrx/versions.json +++ b/nix/cargo-pgrx/versions.json @@ -96,7 +96,7 @@ "hash": "sha256-3TsNpEqNm3Uol5XPW1i0XEbP2fF2+RKB2d7lO6BDnvQ=", "rust": { "1.87.0": { - "cargoHash": "sha256-Ny7j56pwB+2eEK62X0nWfFKQy5fBz+Q1oyvecivxLkk=" + "cargoHash": "sha256-LZUXhjMxkBs3O5feH4X5NQC7Qk4Ja6M5+sAYaSCikrY=" } } }, From 57a4d1da2fa84b6368187d59813abe2ceaa50780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 21 Jul 2025 12:20:53 +0200 Subject: [PATCH 12/52] chore(postgresql): add isOrioleDB condition --- nix/postgresql/generic.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index c29ae9646..efc0c6c67 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -81,6 +81,8 @@ let else (lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd); + isOrioleDB = (builtins.match "[0-9][0-9]_.*" version) != null; + pname = "postgresql"; stdenv' = if jitSupport then llvmPackages.stdenv else stdenv; @@ -90,17 +92,11 @@ let pname = pname + lib.optionalString jitSupport "-jit"; src = - if isOrioleDB then - if revision != null then - fetchurl { - url = "https://github.com/orioledb/postgres/archive/${revision}.tar.gz"; - inherit hash; - } - else - fetchurl { - url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz"; - inherit hash; - } + if (isOrioleDB) then + fetchurl { + url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz"; + inherit hash; + } else fetchurl { url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2"; From a36eb971f8b3e8ad05881d9dc147fc2887fb4fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 21 Jul 2025 15:11:53 +0200 Subject: [PATCH 13/52] fix: pgregress tests --- nix/tests/expected/pgrouting.out | 12 +-- nix/tests/expected/z_15_ext_interface.out | 91 +++++++++++++------ nix/tests/expected/z_17_ext_interface.out | 89 ++++++++++++------ .../expected/z_orioledb-17_ext_interface.out | 89 ++++++++++++------ 4 files changed, 190 insertions(+), 91 deletions(-) diff --git a/nix/tests/expected/pgrouting.out b/nix/tests/expected/pgrouting.out index 2362a72ed..f74d8e680 100644 --- a/nix/tests/expected/pgrouting.out +++ b/nix/tests/expected/pgrouting.out @@ -19,12 +19,12 @@ select * from pgr_dijkstra( 1, -- start node 4 -- end node ); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 1 | 1 | 1 | 0 - 2 | 2 | 2 | 2 | 1 | 1 - 3 | 3 | 3 | 3 | 1 | 2 - 4 | 4 | 4 | -1 | 0 | 3 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 4 | 1 | 1 | 1 | 0 + 2 | 2 | 1 | 4 | 2 | 2 | 1 | 1 + 3 | 3 | 1 | 4 | 3 | 3 | 1 | 2 + 4 | 4 | 1 | 4 | 4 | -1 | 0 | 3 (4 rows) drop schema v cascade; diff --git a/nix/tests/expected/z_15_ext_interface.out b/nix/tests/expected/z_15_ext_interface.out index c68d84210..88c72dfe1 100644 --- a/nix/tests/expected/z_15_ext_interface.out +++ b/nix/tests/expected/z_15_ext_interface.out @@ -14,7 +14,7 @@ added and you should `create extension ...` to enable it in ./nix/tests/prime */ create extension if not exists adminpack; create extension if not exists plv8 with version '3.1.10'; -create extension if not exists plcoffee; +create extension if not exists plcoffee;ß create extension if not exists plls; create extension if not exists old_snapshot; create extension if not exists timescaledb; @@ -1622,6 +1622,7 @@ order by pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_betweennesscentrality | edges_sql text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1638,6 +1639,7 @@ order by pgrouting | public | _pgr_compiler_version | | text pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | _pgr_contractionhierarchies | edges_sql text, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1653,6 +1655,7 @@ order by pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_drivingdistancev4 | text, anyarray, double precision, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1674,6 +1677,9 @@ order by pgrouting | public | _pgr_isplanar | text | boolean pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_kruskalv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | text, anyarray, anyarray, integer, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | text, text, integer, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record pgrouting | public | _pgr_lib_version | | text @@ -1694,6 +1700,7 @@ order by pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_primv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_quote_ident | idname text | text pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_startpoint | g geometry | geometry @@ -1708,6 +1715,8 @@ order by pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspv4 | text, text, text, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspv4 | text, text, anyarray, anyarray, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record @@ -1719,6 +1728,9 @@ order by pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsddv4 | text, text, anyarray, double precision, character, boolean, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, boolean, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | text, text, text, integer, character, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record @@ -1729,10 +1741,10 @@ order by pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint - pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1740,10 +1752,10 @@ order by pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1767,6 +1779,7 @@ order by pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_betweennesscentrality | text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1786,6 +1799,10 @@ order by pgrouting | public | pgr_chinesepostmancost | text | double precision pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contraction | text, directed boolean, methods integer[], cycles integer, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contractiondeadend | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contractionhierarchies | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record + pgrouting | public | pgr_contractionlinear | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1794,12 +1811,13 @@ order by pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_degree | text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1817,8 +1835,8 @@ order by pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1838,21 +1856,27 @@ order by pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_isplanar | text | boolean pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, anyarray, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, text, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, anyarray, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record @@ -1878,19 +1902,21 @@ order by pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_separatecrossing | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record + pgrouting | public | pgr_separatetouching | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record @@ -1928,9 +1954,16 @@ order by pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, character, directed boolean, details boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, character, directed boolean, details boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, text, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, anyarray, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key diff --git a/nix/tests/expected/z_17_ext_interface.out b/nix/tests/expected/z_17_ext_interface.out index 1b09ed17e..36401b508 100644 --- a/nix/tests/expected/z_17_ext_interface.out +++ b/nix/tests/expected/z_17_ext_interface.out @@ -1607,6 +1607,7 @@ order by pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_betweennesscentrality | edges_sql text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1623,6 +1624,7 @@ order by pgrouting | public | _pgr_compiler_version | | text pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | _pgr_contractionhierarchies | edges_sql text, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1638,6 +1640,7 @@ order by pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_drivingdistancev4 | text, anyarray, double precision, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1659,6 +1662,9 @@ order by pgrouting | public | _pgr_isplanar | text | boolean pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_kruskalv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | text, anyarray, anyarray, integer, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | text, text, integer, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record pgrouting | public | _pgr_lib_version | | text @@ -1679,6 +1685,7 @@ order by pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_primv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_quote_ident | idname text | text pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_startpoint | g geometry | geometry @@ -1693,6 +1700,8 @@ order by pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspv4 | text, text, text, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspv4 | text, text, anyarray, anyarray, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record @@ -1704,6 +1713,9 @@ order by pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsddv4 | text, text, anyarray, double precision, character, boolean, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, boolean, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | text, text, text, integer, character, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record @@ -1714,10 +1726,10 @@ order by pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint - pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1725,10 +1737,10 @@ order by pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1752,6 +1764,7 @@ order by pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_betweennesscentrality | text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1771,6 +1784,10 @@ order by pgrouting | public | pgr_chinesepostmancost | text | double precision pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contraction | text, directed boolean, methods integer[], cycles integer, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contractiondeadend | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contractionhierarchies | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record + pgrouting | public | pgr_contractionlinear | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1779,12 +1796,13 @@ order by pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_degree | text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1802,8 +1820,8 @@ order by pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1823,21 +1841,27 @@ order by pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_isplanar | text | boolean pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, anyarray, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, text, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, anyarray, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record @@ -1863,19 +1887,21 @@ order by pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_separatecrossing | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record + pgrouting | public | pgr_separatetouching | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record @@ -1913,9 +1939,16 @@ order by pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, character, directed boolean, details boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, character, directed boolean, details boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, text, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, anyarray, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key diff --git a/nix/tests/expected/z_orioledb-17_ext_interface.out b/nix/tests/expected/z_orioledb-17_ext_interface.out index 1b09ed17e..36401b508 100644 --- a/nix/tests/expected/z_orioledb-17_ext_interface.out +++ b/nix/tests/expected/z_orioledb-17_ext_interface.out @@ -1607,6 +1607,7 @@ order by pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_betweennesscentrality | edges_sql text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1623,6 +1624,7 @@ order by pgrouting | public | _pgr_compiler_version | | text pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | _pgr_contractionhierarchies | edges_sql text, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1638,6 +1640,7 @@ order by pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_drivingdistancev4 | text, anyarray, double precision, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1659,6 +1662,9 @@ order by pgrouting | public | _pgr_isplanar | text | boolean pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_kruskalv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | text, anyarray, anyarray, integer, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | text, text, integer, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record pgrouting | public | _pgr_lib_version | | text @@ -1679,6 +1685,7 @@ order by pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_primv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_quote_ident | idname text | text pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_startpoint | g geometry | geometry @@ -1693,6 +1700,8 @@ order by pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspv4 | text, text, text, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspv4 | text, text, anyarray, anyarray, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record @@ -1704,6 +1713,9 @@ order by pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsddv4 | text, text, anyarray, double precision, character, boolean, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, boolean, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | text, text, text, integer, character, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record @@ -1714,10 +1726,10 @@ order by pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint - pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1725,10 +1737,10 @@ order by pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1752,6 +1764,7 @@ order by pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_betweennesscentrality | text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1771,6 +1784,10 @@ order by pgrouting | public | pgr_chinesepostmancost | text | double precision pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contraction | text, directed boolean, methods integer[], cycles integer, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contractiondeadend | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_contractionhierarchies | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record + pgrouting | public | pgr_contractionlinear | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1779,12 +1796,13 @@ order by pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_degree | text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1802,8 +1820,8 @@ order by pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1823,21 +1841,27 @@ order by pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_isplanar | text | boolean pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, anyarray, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, text, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, anyarray, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record @@ -1863,19 +1887,21 @@ order by pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_separatecrossing | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record + pgrouting | public | pgr_separatetouching | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record @@ -1913,9 +1939,16 @@ order by pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, character, directed boolean, details boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, character, directed boolean, details boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, text, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, anyarray, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key From 2664442a5b612c9ee207f0f83a48b40b751fa8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Tue, 22 Jul 2025 13:37:11 +0200 Subject: [PATCH 14/52] fix: update schema for dbmate schema_migrations table dbmate 2.27 is now using a varchar for the version column in the schema_migrations table. See https://github.com/amacneil/dbmate/pull/641 --- migrations/schema-15.sql | 2 +- migrations/schema-17.sql | 2 +- migrations/schema-orioledb-17.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migrations/schema-15.sql b/migrations/schema-15.sql index 20ecd988f..8f64dbda3 100644 --- a/migrations/schema-15.sql +++ b/migrations/schema-15.sql @@ -637,7 +637,7 @@ COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure sch -- CREATE TABLE public.schema_migrations ( - version character varying(128) NOT NULL + version character varying NOT NULL ); diff --git a/migrations/schema-17.sql b/migrations/schema-17.sql index da641e799..8017d8841 100644 --- a/migrations/schema-17.sql +++ b/migrations/schema-17.sql @@ -638,7 +638,7 @@ COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure sch -- CREATE TABLE public.schema_migrations ( - version character varying(128) NOT NULL + version character varying NOT NULL ); diff --git a/migrations/schema-orioledb-17.sql b/migrations/schema-orioledb-17.sql index 3c5e0ce56..b594bd502 100644 --- a/migrations/schema-orioledb-17.sql +++ b/migrations/schema-orioledb-17.sql @@ -652,7 +652,7 @@ COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure sch -- CREATE TABLE public.schema_migrations ( - version character varying(128) NOT NULL + version character varying NOT NULL ); From 50148039bf020372d3daa54e48138a31986c1491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 11 Aug 2025 12:35:42 +0200 Subject: [PATCH 15/52] Structured attributes are now required when building with separateDebugInfo See https://github.com/NixOS/nixpkgs/pull/394674 --- nix/postgresql/generic.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index efc0c6c67..e4b74d4db 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -150,6 +150,7 @@ let enableParallelBuilding = true; separateDebugInfo = true; + __structuredAttrs = true; buildFlags = [ "world-bin" ]; From d7efba97f95b3557477c10b39d1173ea3b708b17 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 2 Sep 2025 09:26:13 -0400 Subject: [PATCH 16/52] chore: version bump --- nix/ext/pg_net.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix index 229971a81..d9f47aab8 100644 --- a/nix/ext/pg_net.nix +++ b/nix/ext/pg_net.nix @@ -20,7 +20,8 @@ let buildInputs = [ curl postgresql - ] ++ lib.optional (version == "0.6") libuv; + ] + ++ lib.optional (version == "0.6") libuv; src = fetchFromGitHub { owner = "supabase"; From 171a4ee02c01c6d242d88a3cd3296a2cccca8dc3 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 9 Sep 2025 17:30:24 -0400 Subject: [PATCH 17/52] fix: rebase on develop and fix code api changes from nixpkgs --- nix/cargo-pgrx/default.nix | 4 ++-- nix/checks.nix | 1 - nix/ext/plv8.nix | 7 ++---- nix/ext/postgis.nix | 23 ------------------- nix/ext/tests/lib.py | 43 +++++------------------------------- nix/ext/wrappers/default.nix | 20 +++++++---------- nix/overlays/default.nix | 2 +- nix/packages/packer.nix | 3 +-- nix/postgresql/generic.nix | 32 +++++++++++++-------------- testinfra/test_ami_nix.py | 28 ++++++++++++----------- 10 files changed, 51 insertions(+), 112 deletions(-) diff --git a/nix/cargo-pgrx/default.nix b/nix/cargo-pgrx/default.nix index 97b534e95..e87d3c97d 100644 --- a/nix/cargo-pgrx/default.nix +++ b/nix/cargo-pgrx/default.nix @@ -1,6 +1,6 @@ { lib, - darwin, + apple-sdk_11, fetchCrate, openssl, pkg-config, @@ -36,7 +36,7 @@ let nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ]; OPENSSL_DIR = "${openssl.dev}"; OPENSSL_INCLUDE_DIR = "${openssl.dev}/include"; diff --git a/nix/checks.nix b/nix/checks.nix index 948d56acf..115802fb3 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -2,7 +2,6 @@ { perSystem = { - lib, self', system, pkgs, diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix index a02f30be8..4f333fd77 100644 --- a/nix/ext/plv8.nix +++ b/nix/ext/plv8.nix @@ -9,7 +9,7 @@ # to nixpkgs clang, xcbuild, - darwin, + apple-sdk_11, patchelf, }: let @@ -50,8 +50,7 @@ stdenv.mkDerivation (finalAttrs: { postgresql ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.Kerberos + apple-sdk_11 ]; buildFlags = [ "all" ]; @@ -77,10 +76,8 @@ stdenv.mkDerivation (finalAttrs: { "-lpq" "-lpgcommon" "-lpgport" - "-F${darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks" "-framework" "CoreFoundation" - "-F${darwin.apple_sdk.frameworks.Kerberos}/Library/Frameworks" "-framework" "Kerberos" "-undefined" diff --git a/nix/ext/postgis.nix b/nix/ext/postgis.nix index 62de91a10..cdf48fb24 100644 --- a/nix/ext/postgis.nix +++ b/nix/ext/postgis.nix @@ -48,32 +48,9 @@ let "postgis_topology" ]; -<<<<<<< HEAD sqlExtensions = [ "address_standardizer_data_us" "postgis_tiger_geocoder" -======= - src = fetchurl { - url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"; - sha256 = "sha256-UHJKDd5JrcJT5Z4CTYsY/va+ToU0GUPG1eHhuXTkP84="; - }; - - buildInputs = [ - libxml2 - postgresql - geos - proj - gdal - json_c - protobufc - pcre2.dev - sfcgal - ] - ++ lib.optional stdenv.isDarwin libiconv; - nativeBuildInputs = [ - perl - pkg-config ->>>>>>> 4847adac (chore: update fmt) ]; # Build function for individual versions diff --git a/nix/ext/tests/lib.py b/nix/ext/tests/lib.py index d04f830fd..fe37463ce 100644 --- a/nix/ext/tests/lib.py +++ b/nix/ext/tests/lib.py @@ -93,9 +93,9 @@ def assert_version_matches(self, expected_version: str): AssertionError: If the installed version does not match the expected version """ installed_version = self.get_installed_version() - assert ( - installed_version == expected_version - ), f"Expected version {expected_version}, but found {installed_version}" + assert installed_version == expected_version, ( + f"Expected version {expected_version}, but found {installed_version}" + ) def check_upgrade_path(self, pg_version: str): """Test the complete upgrade path for a PostgreSQL version. @@ -181,37 +181,6 @@ def check_switch_extension_with_background_worker( self.vm.succeed(f"switch_{self.extension_name}_version {last_version}") # Check that we are using the last version now ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip() - assert ext_version.endswith( - f"{last_version}.so" - ), f"Expected {self.extension_name} version {last_version}, but found {ext_version}" - - def check_pg_regress(self, pg_regress: Path, pg_version: str, test_name: str): - """Run pg_regress tests for the extension on a given PostgreSQL version. - - Args: - pg_regress: Path to the pg_regress binary - pg_version: PostgreSQL version to test (e.g., "14", "15") - test_name: SQL test file to run with pg_regress - """ - sql_file = self.sql_test_dir / "sql" / f"{test_name}.sql" - if not sql_file.exists(): - # check if we have a postgres version specific sql file - test_name = f"z_{pg_version}_{test_name}" - sql_file = self.sql_test_dir / "sql" / f"{test_name}.sql" - if not sql_file.exists(): - print(f"Skipping pg_regress test for {pg_version}, no sql file found") - return - try: - print( - self.vm.succeed( - f"""sudo -u postgres {pg_regress} --inputdir={self.sql_test_dir} --debug --use-existing --dbname=postgres --outputdir=/tmp/regression_output_{pg_version} "{test_name}" """ - ) - ) - except: - print("Error running pg_regress, diff:") - print( - self.vm.succeed( - f"cat /tmp/regression_output_{pg_version}/regression.diffs" - ) - ) - raise + assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), ( + f"Expected {self.extension_name} version {last_version}, but found {ext_version}" + ) diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index c9f22dc4a..645484f8e 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -7,7 +7,7 @@ pkg-config, postgresql, buildEnv, - darwin, + apple-sdk_11, rust-bin, git, }: @@ -37,17 +37,13 @@ let cargo git ]; - buildInputs = - [ - openssl - postgresql - ] - ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.CoreServices - darwin.apple_sdk.frameworks.Security - darwin.apple_sdk.frameworks.SystemConfiguration - ]; + buildInputs = [ + openssl + postgresql + ] + ++ lib.optionals stdenv.isDarwin [ + apple-sdk_11 + ]; NIX_LDFLAGS = "-L${postgresql}/lib -lpq"; diff --git a/nix/overlays/default.nix b/nix/overlays/default.nix index 9c28c1082..6821405bd 100644 --- a/nix/overlays/default.nix +++ b/nix/overlays/default.nix @@ -19,7 +19,7 @@ cargo-pgrx = final.callPackage ../cargo-pgrx/default.nix { inherit (final) lib; - inherit (final) darwin; + inherit (final) apple-sdk_11; inherit (final) fetchCrate; inherit (final) openssl; inherit (final) pkg-config; diff --git a/nix/packages/packer.nix b/nix/packages/packer.nix index 7f0063c30..e3f002258 100644 --- a/nix/packages/packer.nix +++ b/nix/packages/packer.nix @@ -33,8 +33,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals pkgs.stdenv.isDarwin [ - pkgs.darwin.apple_sdk.frameworks.IOKit - pkgs.darwin.apple_sdk.frameworks.Security + pkgs.apple-sdk_11 ]; postInstall = '' diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index e4b74d4db..604fb5f5d 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -7,7 +7,6 @@ let stdenv, lib, fetchurl, - fetchpatch, makeWrapper, glibc, zlib, @@ -115,7 +114,7 @@ let zlib readline openssl - (libxml2.override { python = python3; }) + (libxml2.override { python3 = python3; }) icu ] ++ lib.optionals (olderThan "13") [ libxcrypt ] @@ -192,20 +191,21 @@ let locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; }) ] - ++ lib.optionals (olderThan "17") [ - # back port changes related to tzdata release 2024b - (fetchpatch ({ - url = "https://github.com/postgres/postgres/commit/b27622c90869aab63cfe22159a459c57768b0fa4.patch"; - hash = "sha256-7G+BkJULhyx6nlMEjClcr2PJg6awgymZHr2JgGhXanA="; - excludes = [ "doc/*" ]; - })) - # back port changes related to tzdata release 2025a - (fetchpatch ({ - url = "https://github.com/postgres/postgres/commit/aac0384975ff1129557cd2158fab4656f933cdc8.patch"; - hash = "sha256-4Aua4QJhCS9B0zegQ9I6Us5QfX7GuRUilnkmOpSTUUw="; - excludes = [ "doc/*" ]; - })) - ] + # tzdata patches temporarily removed due to conflicts with PostgreSQL 15.14 + # ++ lib.optionals (olderThan "17") [ + # # back port changes related to tzdata release 2024b + # (fetchpatch ({ + # url = "https://github.com/postgres/postgres/commit/b27622c90869aab63cfe22159a459c57768b0fa4.patch"; + # hash = "sha256-7G+BkJULhyx6nlMEjClcr2PJg6awgymZHr2JgGhXanA="; + # excludes = [ "doc/*" ]; + # })) + # # back port changes related to tzdata release 2025a + # (fetchpatch ({ + # url = "https://github.com/postgres/postgres/commit/aac0384975ff1129557cd2158fab4656f933cdc8.patch"; + # hash = "sha256-4Aua4QJhCS9B0zegQ9I6Us5QfX7GuRUilnkmOpSTUUw="; + # excludes = [ "doc/*" ]; + # })) + # ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) diff --git a/testinfra/test_ami_nix.py b/testinfra/test_ami_nix.py index 1b00f2c84..a5cadcad9 100644 --- a/testinfra/test_ami_nix.py +++ b/testinfra/test_ami_nix.py @@ -421,9 +421,9 @@ def is_healthy(ssh) -> bool: def test_postgrest_is_running(host): """Check if postgrest service is running using our SSH connection.""" result = run_ssh_command(host["ssh"], "systemctl is-active postgrest") - assert ( - result["succeeded"] and result["stdout"].strip() == "active" - ), "PostgREST service is not running" + assert result["succeeded"] and result["stdout"].strip() == "active", ( + "PostgREST service is not running" + ) def test_postgrest_responds_to_requests(host): @@ -546,9 +546,9 @@ def test_postgresql_version(host): if version_match: major_version = int(version_match.group(1)) print(f"PostgreSQL major version: {major_version}") - assert ( - major_version >= 14 - ), f"PostgreSQL version {major_version} is less than 14" + assert major_version >= 14, ( + f"PostgreSQL version {major_version} is less than 14" + ) else: assert False, "Could not parse PostgreSQL version number" else: @@ -578,9 +578,9 @@ def test_libpq5_version(host): if version_match: major_version = int(version_match.group(1)) print(f"libpq5 major version: {major_version}") - assert ( - major_version >= 14 - ), f"libpq5 version {major_version} is less than 14" + assert major_version >= 14, ( + f"libpq5 version {major_version} is less than 14" + ) else: print("Could not parse libpq5 version from dpkg output") else: @@ -613,9 +613,9 @@ def test_libpq5_version(host): if version_match: major_version = int(version_match.group(1)) print(f"psql/libpq major version: {major_version}") - assert ( - major_version >= 14 - ), f"psql/libpq version {major_version} is less than 14" + assert major_version >= 14, ( + f"psql/libpq version {major_version} is less than 14" + ) else: print("Could not parse psql version") @@ -776,7 +776,9 @@ def test_postgrest_read_only_session_attrs(host): print( f"\nFound 'session is not read-only' errors in PostgREST logs:\n{result['stdout']}" ) - assert False, "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode" + assert False, ( + "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode" + ) else: print("\nNo 'session is not read-only' errors found in PostgREST logs") From fafb14eded72990cfcf1aed04106229cbef44c88 Mon Sep 17 00:00:00 2001 From: samrose Date: Wed, 10 Sep 2025 15:34:54 -0400 Subject: [PATCH 18/52] tests: try to get passing tests --- nix/ext/tests/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nix/ext/tests/default.nix b/nix/ext/tests/default.nix index 57644ee7f..07cd9e7d9 100644 --- a/nix/ext/tests/default.nix +++ b/nix/ext/tests/default.nix @@ -29,6 +29,9 @@ let inherit (postgresql) version psqlSchema; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; + installedExtensions = [ (installedExtension majorVersion) ]; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ From e7330b2dfe9583660212d252f81719a765cdb6b7 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 11 Sep 2025 11:13:57 -0400 Subject: [PATCH 19/52] feat: pin icu75 for postgres build to maintain compat with existing deployments --- nix/postgresql/generic.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 604fb5f5d..01ab9f087 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -12,7 +12,7 @@ let zlib, readline, openssl, - icu, + icu75, lz4, zstd, systemd, @@ -115,7 +115,9 @@ let readline openssl (libxml2.override { python3 = python3; }) - icu + # Pin ICU to version 75 to maintain collation version 153.120 + # This prevents collation mismatch warnings when upgrading nixpkgs + icu75 ] ++ lib.optionals (olderThan "13") [ libxcrypt ] ++ lib.optionals jitSupport [ llvmPackages.llvm ] From ba1a6ed4668a46d55578f206bde3bd69d2245d09 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 11 Sep 2025 14:35:24 -0400 Subject: [PATCH 20/52] chore: remove commented out code not needed in latest changes to pg --- nix/postgresql/generic.nix | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 01ab9f087..f243e8de2 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -193,21 +193,6 @@ let locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; }) ] - # tzdata patches temporarily removed due to conflicts with PostgreSQL 15.14 - # ++ lib.optionals (olderThan "17") [ - # # back port changes related to tzdata release 2024b - # (fetchpatch ({ - # url = "https://github.com/postgres/postgres/commit/b27622c90869aab63cfe22159a459c57768b0fa4.patch"; - # hash = "sha256-7G+BkJULhyx6nlMEjClcr2PJg6awgymZHr2JgGhXanA="; - # excludes = [ "doc/*" ]; - # })) - # # back port changes related to tzdata release 2025a - # (fetchpatch ({ - # url = "https://github.com/postgres/postgres/commit/aac0384975ff1129557cd2158fab4656f933cdc8.patch"; - # hash = "sha256-4Aua4QJhCS9B0zegQ9I6Us5QfX7GuRUilnkmOpSTUUw="; - # excludes = [ "doc/*" ]; - # })) - # ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) From 3623ba5f99141b1c14522d589e81a8190cadbe58 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Wed, 19 Nov 2025 11:40:59 +0100 Subject: [PATCH 21/52] fix: apparently incorrectly rebased changes, and % nix fmt --- nix/checks.nix | 1 + nix/ext/gdal.nix | 17 +- nix/ext/pg_net.nix | 3 +- nix/ext/pgroonga.nix | 3 +- nix/ext/pgrouting.nix | 22 --- nix/ext/plv8.nix | 59 +++---- nix/ext/tests/lib.py | 12 +- nix/ext/wal2json.nix | 2 +- nix/ext/wrappers/default.nix | 5 +- nix/overlays/default.nix | 2 +- nix/packages/groonga/default.nix | 29 ++-- nix/packages/lib.nix | 13 +- nix/packages/packer.nix | 4 +- nix/postgresql/generic.nix | 284 ++++++++++++++++--------------- testinfra/test_ami_nix.py | 28 ++- 15 files changed, 231 insertions(+), 253 deletions(-) diff --git a/nix/checks.nix b/nix/checks.nix index 115802fb3..99216dbd4 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -5,6 +5,7 @@ self', system, pkgs, + lib, ... }: let diff --git a/nix/ext/gdal.nix b/nix/ext/gdal.nix index c4dba3e69..739f7e432 100644 --- a/nix/ext/gdal.nix +++ b/nix/ext/gdal.nix @@ -47,14 +47,15 @@ stdenv.mkDerivation rec { zlib ]; - cmakeFlags = [ - "-DGDAL_USE_INTERNAL_LIBS=OFF" - "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include" - "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}" - "-DBUILD_PYTHON_BINDINGS=OFF" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ] - ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; + cmakeFlags = + [ + "-DGDAL_USE_INTERNAL_LIBS=OFF" + "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include" + "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DBUILD_PYTHON_BINDINGS=OFF" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ] + ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; enableParallelBuilding = true; diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix index d9f47aab8..229971a81 100644 --- a/nix/ext/pg_net.nix +++ b/nix/ext/pg_net.nix @@ -20,8 +20,7 @@ let buildInputs = [ curl postgresql - ] - ++ lib.optional (version == "0.6") libuv; + ] ++ lib.optional (version == "0.6") libuv; src = fetchFromGitHub { owner = "supabase"; diff --git a/nix/ext/pgroonga.nix b/nix/ext/pgroonga.nix index 5d73d9ef8..d57efc8fb 100644 --- a/nix/ext/pgroonga.nix +++ b/nix/ext/pgroonga.nix @@ -28,8 +28,7 @@ stdenv.mkDerivation rec { msgpack-c supabase-groonga mecab - ] - ++ lib.optionals stdenv.isDarwin [ xxHash ]; + ] ++ lib.optionals stdenv.isDarwin [ xxHash ]; propagatedBuildInputs = [ supabase-groonga ]; configureFlags = [ diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting.nix index caa71480a..48833791e 100644 --- a/nix/ext/pgrouting.nix +++ b/nix/ext/pgrouting.nix @@ -127,34 +127,12 @@ buildEnv { expectedFiles=${toString (numberOfVersions + 1)} actualFiles=$(ls -l $out/lib/lib${pname}*${postgresql.dlSuffix} | wc -l) -<<<<<<< HEAD if [[ "$actualFiles" != "$expectedFiles" ]]; then echo "Error: Expected $expectedFiles library files, found $actualFiles" echo "Files found:" ls -la $out/lib/*${postgresql.dlSuffix} || true exit 1 fi -======= - #disable compile time warnings for incompatible pointer types only on macos and pg16 - NIX_CFLAGS_COMPILE = lib.optionalString ( - stdenv.isDarwin && lib.versionAtLeast postgresql.version "16" - ) "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types"; - - cmakeFlags = [ - "-DPOSTGRESQL_VERSION=${postgresql.version}" - ] - ++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [ - "-DCMAKE_MACOSX_RPATH=ON" - "-DCMAKE_SHARED_MODULE_SUFFIX=.dylib" - "-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib" - ]; - - preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") '' - export DLSUFFIX=.dylib - export CMAKE_SHARED_LIBRARY_SUFFIX=.dylib - export CMAKE_SHARED_MODULE_SUFFIX=.dylib - export MACOSX_RPATH=ON ->>>>>>> 4847adac (chore: update fmt) ''; passthru = { diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix index 4f333fd77..26ff03a01 100644 --- a/nix/ext/plv8.nix +++ b/nix/ext/plv8.nix @@ -37,36 +37,33 @@ stdenv.mkDerivation (finalAttrs: { ./0001-build-Allow-using-V8-from-system.patch ]; - nativeBuildInputs = [ - perl - ] - ++ lib.optionals stdenv.isDarwin [ - clang - xcbuild - ]; + nativeBuildInputs = + [ perl ] + ++ lib.optionals stdenv.isDarwin [ + clang + xcbuild + ]; buildInputs = [ v8 postgresql - ] - ++ lib.optionals stdenv.isDarwin [ - apple-sdk_11 - ]; + ] ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; buildFlags = [ "all" ]; - makeFlags = [ - # Nixpkgs build a v8 monolith instead of separate v8_libplatform. - "USE_SYSTEM_V8=1" - "V8_OUTDIR=${v8}/lib" - "PG_CONFIG=${postgresql}/bin/pg_config" - ] - ++ lib.optionals stdenv.isDarwin [ - "CC=${clang}/bin/clang" - "CXX=${clang}/bin/clang++" - "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; + makeFlags = + [ + # Nixpkgs build a v8 monolith instead of separate v8_libplatform. + "USE_SYSTEM_V8=1" + "V8_OUTDIR=${v8}/lib" + "PG_CONFIG=${postgresql}/bin/pg_config" + ] + ++ lib.optionals stdenv.isDarwin [ + "CC=${clang}/bin/clang" + "CXX=${clang}/bin/clang++" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; NIX_LDFLAGS = ( lib.optionals stdenv.isDarwin [ @@ -127,9 +124,11 @@ stdenv.mkDerivation (finalAttrs: { install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8.so ''} - ${lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so - ''} + ${ + lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so + '' + } else ${lib.optionalString stdenv.isDarwin '' install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} @@ -138,9 +137,11 @@ stdenv.mkDerivation (finalAttrs: { install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} ''} - ${lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} - ''} + ${ + lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + '' + } fi ''; diff --git a/nix/ext/tests/lib.py b/nix/ext/tests/lib.py index fe37463ce..e01f5f234 100644 --- a/nix/ext/tests/lib.py +++ b/nix/ext/tests/lib.py @@ -93,9 +93,9 @@ def assert_version_matches(self, expected_version: str): AssertionError: If the installed version does not match the expected version """ installed_version = self.get_installed_version() - assert installed_version == expected_version, ( - f"Expected version {expected_version}, but found {installed_version}" - ) + assert ( + installed_version == expected_version + ), f"Expected version {expected_version}, but found {installed_version}" def check_upgrade_path(self, pg_version: str): """Test the complete upgrade path for a PostgreSQL version. @@ -181,6 +181,6 @@ def check_switch_extension_with_background_worker( self.vm.succeed(f"switch_{self.extension_name}_version {last_version}") # Check that we are using the last version now ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip() - assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), ( - f"Expected {self.extension_name} version {last_version}, but found {ext_version}" - ) + assert ext_version.endswith( + f"{self.extension_name}-{last_version}.so" + ), f"Expected {self.extension_name} version {last_version}, but found {ext_version}" diff --git a/nix/ext/wal2json.nix b/nix/ext/wal2json.nix index bd1e8ddd8..43ddab8df 100644 --- a/nix/ext/wal2json.nix +++ b/nix/ext/wal2json.nix @@ -10,7 +10,7 @@ let pname = "wal2json"; build = - version: rev: hash: + version: _rev: hash: stdenv.mkDerivation rec { inherit version pname; diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index 645484f8e..2bbc3e888 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -40,10 +40,7 @@ let buildInputs = [ openssl postgresql - ] - ++ lib.optionals stdenv.isDarwin [ - apple-sdk_11 - ]; + ] ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; NIX_LDFLAGS = "-L${postgresql}/lib -lpq"; diff --git a/nix/overlays/default.nix b/nix/overlays/default.nix index 6821405bd..4e3620503 100644 --- a/nix/overlays/default.nix +++ b/nix/overlays/default.nix @@ -1,6 +1,6 @@ { self, ... }: { - flake.overlays.default = final: _prev: { + flake.overlays.default = final: prev: { # NOTE: add any needed overlays here. in theory we could # pull them from the overlays/ directory automatically, but we don't # want to have an arbitrary order, since it might matter. being diff --git a/nix/packages/groonga/default.nix b/nix/packages/groonga/default.nix index c6d734db6..bef491109 100644 --- a/nix/packages/groonga/default.nix +++ b/nix/packages/groonga/default.nix @@ -36,20 +36,21 @@ stdenv.mkDerivation (finalAttrs: { pkg-config makeWrapper ]; - buildInputs = [ - rapidjson - xxHash - zstd - mecab - kytea - msgpack-c - ] - ++ lib.optionals lz4Support [ lz4 ] - ++ lib.optional zlibSupport [ zlib ] - ++ lib.optionals suggestSupport [ - zeromq - libevent - ]; + buildInputs = + [ + rapidjson + xxHash + zstd + mecab + kytea + msgpack-c + ] + ++ lib.optionals lz4Support [ lz4 ] + ++ lib.optional zlibSupport [ zlib ] + ++ lib.optionals suggestSupport [ + zeromq + libevent + ]; cmakeFlags = [ "-DWITH_MECAB=ON" "-DMECAB_DICDIR=${mecab-naist-jdic}/lib/mecab/dic/naist-jdic" diff --git a/nix/packages/lib.nix b/nix/packages/lib.nix index ef8f64069..cf541913d 100644 --- a/nix/packages/lib.nix +++ b/nix/packages/lib.nix @@ -100,8 +100,7 @@ PGBOUNCER_AUTH_SCHEMA_SQL = "${paths.pgbouncerAuthSchemaSql}"; STAT_EXTENSION_SQL = "${paths.statExtensionSql}"; CURRENT_SYSTEM = "${system}"; - } - // extraSubstitutions; # Merge in any extra substitutions + } // extraSubstitutions; # Merge in any extra substitutions in pkgs.runCommand name { @@ -130,11 +129,13 @@ chmod 644 $out/etc/postgresql/pg_hba.conf substitute ${../tools/run-server.sh.in} $out/bin/start-postgres-server \ - ${builtins.concatStringsSep " " ( - builtins.attrValues ( - builtins.mapAttrs (name: value: "--subst-var-by '${name}' '${value}'") substitutions + ${ + builtins.concatStringsSep " " ( + builtins.attrValues ( + builtins.mapAttrs (name: value: "--subst-var-by '${name}' '${value}'") substitutions + ) ) - )} + } chmod +x $out/bin/start-postgres-server ''; } diff --git a/nix/packages/packer.nix b/nix/packages/packer.nix index e3f002258..475713469 100644 --- a/nix/packages/packer.nix +++ b/nix/packages/packer.nix @@ -32,9 +32,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals pkgs.stdenv.isDarwin [ - pkgs.apple-sdk_11 - ]; + buildInputs = lib.optionals pkgs.stdenv.isDarwin [ pkgs.apple-sdk_11 ]; postInstall = '' installShellCompletion --zsh contrib/zsh-completion/_packer diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index f243e8de2..a4354d62b 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -65,8 +65,6 @@ let # detection of crypt fails when using llvm stdenv, so we add it manually # for <13 (where it got removed: https://github.com/postgres/postgres/commit/c45643d618e35ec2fe91438df15abd4f3c0d85ca) libxcrypt, - - isOrioleDB ? false, }@args: let atLeast = lib.versionAtLeast version; @@ -110,43 +108,45 @@ let ]; setOutputFlags = false; # $out retains configureFlags :-/ - buildInputs = [ - zlib - readline - openssl - (libxml2.override { python3 = python3; }) - # Pin ICU to version 75 to maintain collation version 153.120 - # This prevents collation mismatch warnings when upgrading nixpkgs - icu75 - ] - ++ lib.optionals (olderThan "13") [ libxcrypt ] - ++ lib.optionals jitSupport [ llvmPackages.llvm ] - ++ lib.optionals lz4Enabled [ lz4 ] - ++ lib.optionals zstdEnabled [ zstd ] - ++ lib.optionals systemdSupport' [ systemd ] - ++ lib.optionals pythonSupport [ python3 ] - ++ lib.optionals gssSupport [ libkrb5 ] - ++ lib.optionals stdenv'.isLinux [ linux-pam ] - ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] - ++ lib.optionals (isOrioleDB || (lib.versionAtLeast version "17")) [ - perl - bison - flex - docbook_xsl - docbook_xml_dtd_45 - docbook_xsl_ns - libxslt - ]; + buildInputs = + [ + zlib + readline + openssl + (libxml2.override { python3 = python3; }) + # Pin ICU to version 75 to maintain collation version 153.120 + # This prevents collation mismatch warnings when upgrading nixpkgs + icu75 + ] + ++ lib.optionals (olderThan "13") [ libxcrypt ] + ++ lib.optionals jitSupport [ llvmPackages.llvm ] + ++ lib.optionals lz4Enabled [ lz4 ] + ++ lib.optionals zstdEnabled [ zstd ] + ++ lib.optionals systemdSupport' [ systemd ] + ++ lib.optionals pythonSupport [ python3 ] + ++ lib.optionals gssSupport [ libkrb5 ] + ++ lib.optionals stdenv'.isLinux [ linux-pam ] + ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] + ++ lib.optionals (isOrioleDB || (lib.versionAtLeast version "17")) [ + perl + bison + flex + docbook_xsl + docbook_xml_dtd_45 + docbook_xsl_ns + libxslt + ]; - nativeBuildInputs = [ - makeWrapper - pkg-config - ] - ++ lib.optionals jitSupport [ - llvmPackages.llvm.dev - nukeReferences - patchelf - ]; + nativeBuildInputs = + [ + makeWrapper + pkg-config + ] + ++ lib.optionals jitSupport [ + llvmPackages.llvm.dev + nukeReferences + patchelf + ]; enableParallelBuilding = true; @@ -159,47 +159,49 @@ let # Fixed upstream in https://github.com/postgres/postgres/commit/0bc8cebdb889368abdf224aeac8bc197fe4c9ae6 env.NIX_CFLAGS_COMPILE = lib.optionalString (olderThan "13") "-I${libxml2.dev}/include/libxml2"; - configureFlags = [ - "--with-openssl" - "--with-libxml" - "--with-icu" - "--sysconfdir=/etc" - "--libdir=$(lib)/lib" - "--with-system-tzdata=${tzdata}/share/zoneinfo" - "--enable-debug" - (lib.optionalString systemdSupport' "--with-systemd") - (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") - ] - ++ lib.optionals lz4Enabled [ "--with-lz4" ] - ++ lib.optionals zstdEnabled [ "--with-zstd" ] - ++ lib.optionals gssSupport [ "--with-gssapi" ] - ++ lib.optionals pythonSupport [ "--with-python" ] - ++ lib.optionals jitSupport [ "--with-llvm" ] - ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; - - patches = [ - ( - if atLeast "16" then - ./patches/relative-to-symlinks-16+.patch - else - ./patches/relative-to-symlinks.patch + configureFlags = + [ + "--with-openssl" + "--with-libxml" + "--with-icu" + "--sysconfdir=/etc" + "--libdir=$(lib)/lib" + "--with-system-tzdata=${tzdata}/share/zoneinfo" + "--enable-debug" + (lib.optionalString systemdSupport' "--with-systemd") + (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") + ] + ++ lib.optionals lz4Enabled [ "--with-lz4" ] + ++ lib.optionals zstdEnabled [ "--with-zstd" ] + ++ lib.optionals gssSupport [ "--with-gssapi" ] + ++ lib.optionals pythonSupport [ "--with-python" ] + ++ lib.optionals jitSupport [ "--with-llvm" ] + ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; + + patches = + [ + ( + if atLeast "16" then + ./patches/relative-to-symlinks-16+.patch + else + ./patches/relative-to-symlinks.patch + ) + ./patches/less-is-more.patch + ./patches/paths-for-split-outputs.patch + ./patches/specify_pkglibdir_at_runtime.patch + ./patches/paths-with-postgresql-suffix.patch + + (replaceVars ./patches/locale-binary-path.patch { + locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; + }) + ] + ++ lib.optionals stdenv'.hostPlatform.isMusl ( + # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 + map fetchurl (lib.attrValues muslPatches) ) - ./patches/less-is-more.patch - ./patches/paths-for-split-outputs.patch - ./patches/specify_pkglibdir_at_runtime.patch - ./patches/paths-with-postgresql-suffix.patch - - (replaceVars ./patches/locale-binary-path.patch { - locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; - }) - ] - ++ lib.optionals stdenv'.hostPlatform.isMusl ( - # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 - map fetchurl (lib.attrValues muslPatches) - ) - ++ lib.optionals stdenv'.isLinux [ - (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) - ]; + ++ lib.optionals stdenv'.isLinux [ + (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) + ]; installTargets = [ "install-world-bin" ]; @@ -218,54 +220,55 @@ let substituteInPlace src/backend/jit/llvm/llvmjit_inline.cpp --replace pkglib_path \"$out/lib\" ''; - postInstall = '' - moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it - moveToOutput "lib/libpgcommon*.a" "$out" - moveToOutput "lib/libpgport*.a" "$out" - moveToOutput "lib/libecpg*" "$out" - - # Prevent a retained dependency on gcc-wrapper. - substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/ld ld - - if [ -z "''${dontDisableStatic:-}" ]; then - # Remove static libraries in case dynamic are available. - for i in $out/lib/*.a $lib/lib/*.a; do - name="$(basename "$i")" - ext="${stdenv'.hostPlatform.extensions.sharedLibrary}" - if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then - rm "$i" - fi - done - fi - '' - + lib.optionalString jitSupport '' - # Move the bitcode and libllvmjit.so library out of $lib; otherwise, every client that - # depends on libpq.so will also have libLLVM.so in its closure too, bloating it - moveToOutput "lib/bitcode" "$out" - moveToOutput "lib/llvmjit*" "$out" - - # In the case of JIT support, prevent a retained dependency on clang-wrapper - substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang - nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) - - # Stop out depending on the default output of llvm - substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${llvmPackages.llvm.out}/bin "" \ - --replace '$(LLVM_BINPATH)/' "" - - # Stop out depending on the -dev output of llvm - substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ - --replace -I${llvmPackages.llvm.dev}/include "" - - ${lib.optionalString (!stdenv'.isDarwin) '' - # Stop lib depending on the -dev output of llvm - rpath=$(patchelf --print-rpath $out/lib/llvmjit.so) - nuke-refs -e $out $out/lib/llvmjit.so - # Restore the correct rpath - patchelf $out/lib/llvmjit.so --set-rpath "$rpath" - ''} - ''; + postInstall = + '' + moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it + moveToOutput "lib/libpgcommon*.a" "$out" + moveToOutput "lib/libpgport*.a" "$out" + moveToOutput "lib/libecpg*" "$out" + + # Prevent a retained dependency on gcc-wrapper. + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/ld ld + + if [ -z "''${dontDisableStatic:-}" ]; then + # Remove static libraries in case dynamic are available. + for i in $out/lib/*.a $lib/lib/*.a; do + name="$(basename "$i")" + ext="${stdenv'.hostPlatform.extensions.sharedLibrary}" + if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then + rm "$i" + fi + done + fi + '' + + lib.optionalString jitSupport '' + # Move the bitcode and libllvmjit.so library out of $lib; otherwise, every client that + # depends on libpq.so will also have libLLVM.so in its closure too, bloating it + moveToOutput "lib/bitcode" "$out" + moveToOutput "lib/llvmjit*" "$out" + + # In the case of JIT support, prevent a retained dependency on clang-wrapper + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang + nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) + + # Stop out depending on the default output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.out}/bin "" \ + --replace '$(LLVM_BINPATH)/' "" + + # Stop out depending on the -dev output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ + --replace -I${llvmPackages.llvm.dev}/include "" + + ${lib.optionalString (!stdenv'.isDarwin) '' + # Stop lib depending on the -dev output of llvm + rpath=$(patchelf --print-rpath $out/lib/llvmjit.so) + nuke-refs -e $out $out/lib/llvmjit.so + # Restore the correct rpath + patchelf $out/lib/llvmjit.so --set-rpath "$rpath" + ''} + ''; postFixup = lib.optionalString (!stdenv'.isDarwin && stdenv'.hostPlatform.libc == "glibc") '' # initdb needs access to "locale" command from glibc. @@ -319,21 +322,22 @@ let postgresql = this; } this.pkgs; - tests = { - postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { - inherit (stdenv) system; - pkgs = self; - package = this; - }; - pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - } - // lib.optionalAttrs jitSupport { - postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { - inherit (stdenv) system; - pkgs = self; - package = this; + tests = + { + postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + } + // lib.optionalAttrs jitSupport { + postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; }; - }; }; meta = with lib; { diff --git a/testinfra/test_ami_nix.py b/testinfra/test_ami_nix.py index a5cadcad9..1b00f2c84 100644 --- a/testinfra/test_ami_nix.py +++ b/testinfra/test_ami_nix.py @@ -421,9 +421,9 @@ def is_healthy(ssh) -> bool: def test_postgrest_is_running(host): """Check if postgrest service is running using our SSH connection.""" result = run_ssh_command(host["ssh"], "systemctl is-active postgrest") - assert result["succeeded"] and result["stdout"].strip() == "active", ( - "PostgREST service is not running" - ) + assert ( + result["succeeded"] and result["stdout"].strip() == "active" + ), "PostgREST service is not running" def test_postgrest_responds_to_requests(host): @@ -546,9 +546,9 @@ def test_postgresql_version(host): if version_match: major_version = int(version_match.group(1)) print(f"PostgreSQL major version: {major_version}") - assert major_version >= 14, ( - f"PostgreSQL version {major_version} is less than 14" - ) + assert ( + major_version >= 14 + ), f"PostgreSQL version {major_version} is less than 14" else: assert False, "Could not parse PostgreSQL version number" else: @@ -578,9 +578,9 @@ def test_libpq5_version(host): if version_match: major_version = int(version_match.group(1)) print(f"libpq5 major version: {major_version}") - assert major_version >= 14, ( - f"libpq5 version {major_version} is less than 14" - ) + assert ( + major_version >= 14 + ), f"libpq5 version {major_version} is less than 14" else: print("Could not parse libpq5 version from dpkg output") else: @@ -613,9 +613,9 @@ def test_libpq5_version(host): if version_match: major_version = int(version_match.group(1)) print(f"psql/libpq major version: {major_version}") - assert major_version >= 14, ( - f"psql/libpq version {major_version} is less than 14" - ) + assert ( + major_version >= 14 + ), f"psql/libpq version {major_version} is less than 14" else: print("Could not parse psql version") @@ -776,9 +776,7 @@ def test_postgrest_read_only_session_attrs(host): print( f"\nFound 'session is not read-only' errors in PostgREST logs:\n{result['stdout']}" ) - assert False, ( - "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode" - ) + assert False, "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode" else: print("\nNo 'session is not read-only' errors found in PostgREST logs") From 3ebd63566e28eeb91f90af750a16bd7c26e2df0a Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 25 Nov 2025 16:12:25 +0100 Subject: [PATCH 22/52] chore: remove nixpkgs-pgbackrest input, and % nix flake update --- flake.lock | 177 ++++++++++++--------------------------- flake.nix | 2 - nix/packages/default.nix | 2 +- 3 files changed, 56 insertions(+), 125 deletions(-) diff --git a/flake.lock b/flake.lock index be3c879f3..f88628c0d 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "type": "github" }, "original": { @@ -21,11 +21,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1751413152, - "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "lastModified": 1763759067, + "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0", "type": "github" }, "original": { @@ -64,7 +64,7 @@ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -82,11 +82,11 @@ ] }, "locked": { - "lastModified": 1750779888, - "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "lastModified": 1763988335, + "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", "type": "github" }, "original": { @@ -155,6 +155,27 @@ "type": "github" } }, + "nix-eval-jobs": { + "inputs": { + "flake-parts": "flake-parts_2", + "nix": "nix", + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1760478325, + "narHash": "sha256-hA+NOH8KDcsuvH7vJqSwk74PyZP3MtvI/l+CggZcnTc=", + "owner": "nix-community", + "repo": "nix-eval-jobs", + "rev": "daa42f9e9c84aeff1e325dd50fda321f53dfd02c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-eval-jobs", + "type": "github" + } + }, "nix-fast-build": { "inputs": { "flake-parts": [ @@ -168,11 +189,11 @@ ] }, "locked": { - "lastModified": 1763868605, - "narHash": "sha256-wO8Lk66GPQeSpzXUzXCBpe2Pj1De17xByrROXxnwIPY=", + "lastModified": 1763989204, + "narHash": "sha256-StOlm5JOQzgTR1pJkOf0+Qu7WMtvZuJg6BGvo+lud8E=", "owner": "Mic92", "repo": "nix-fast-build", - "rev": "0c7fd47fb587250e931a01c6645ab5c0cd737af8", + "rev": "143a477474c7a1818d525eb622551eb79da3eb95", "type": "github" }, "original": { @@ -181,42 +202,18 @@ "type": "github" } }, - "nix-eval-jobs": { - "inputs": { - "flake-parts": "flake-parts_2", - "nix": "nix", - "nixpkgs": "nixpkgs_2", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1760478325, - "narHash": "sha256-hA+NOH8KDcsuvH7vJqSwk74PyZP3MtvI/l+CggZcnTc=", - "owner": "nix-community", - "repo": "nix-eval-jobs", - "rev": "daa42f9e9c84aeff1e325dd50fda321f53dfd02c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-eval-jobs", - "type": "github" - } - }, "nix2container": { "inputs": { - "flake-utils": [ - "flake-utils" - ], "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1752002763, - "narHash": "sha256-JYAkdZvpdSx9GUoHPArctYMypSONob4DYKRkOubUWtY=", + "lastModified": 1761716996, + "narHash": "sha256-vdOuy2pid2/DasUgb08lDOswdPJkN5qjXfBYItVy/R4=", "owner": "nlewo", "repo": "nix2container", - "rev": "4f2437f6a1844b843b380d483087ae6d461240ee", + "rev": "e5496ab66e9de9e3f67dc06f692dfbc471b6316e", "type": "github" }, "original": { @@ -227,15 +224,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1763966396, - "narHash": "sha256-r3JipNKafTOQfXuqez57wro7KnwNsqvMFGQ7b48pcfo=", - "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "lastModified": 315532800, + "narHash": "sha256-vhAtaRMIQiEghARviANBmSnhGz9Qf2IQJ+nQgsDXnVs=", + "rev": "c12c63cd6c5eb34c7b4c3076c6a99e00fcab86ec", "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre901419.5ae3b07d8d65/nixexprs.tar.xz?lastModified=1763966396&rev=5ae3b07d8d6527c42f17c876e404993199144b6a" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre877036.c12c63cd6c5e/nixexprs.tar.xz" }, "original": { "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + "url": "https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz" } }, "nixpkgs-go124": { @@ -256,11 +253,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1751159883, - "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", + "lastModified": 1761765539, + "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", + "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc", "type": "github" }, "original": { @@ -269,80 +266,17 @@ "type": "github" } }, - "nixpkgs-pgbackrest": { - "locked": { - "lastModified": 1764072303, - "narHash": "sha256-R8WxY9F5HNSZstrlsTqxbDMpq7qHzO6TW1uUew849dQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "798ce8bfd0567bbd12ee633a88e53737969ec7d9", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { - "lastModified": 315532800, - "narHash": "sha256-vhAtaRMIQiEghARviANBmSnhGz9Qf2IQJ+nQgsDXnVs=", - "rev": "c12c63cd6c5eb34c7b4c3076c6a99e00fcab86ec", + "lastModified": 1763966396, + "narHash": "sha256-r3JipNKafTOQfXuqez57wro7KnwNsqvMFGQ7b48pcfo=", + "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre877036.c12c63cd6c5e/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre901419.5ae3b07d8d65/nixexprs.tar.xz?lastModified=1763966396&rev=5ae3b07d8d6527c42f17c876e404993199144b6a" }, "original": { "type": "tarball", - "url": "https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1697269602, - "narHash": "sha256-dSzV7Ud+JH4DPVD9od53EgDrxUVQOcSj4KGjggCDVJI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9cb540e9c1910d74a7e10736277f6eb9dff51c81", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1712666087, - "narHash": "sha256-WwjUkWsjlU8iUImbivlYxNyMB1L5YVqE8QotQdL9jWc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "a76c4553d7e741e17f289224eda135423de0491d", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, "root": { @@ -351,12 +285,11 @@ "flake-utils": "flake-utils", "git-hooks": "git-hooks", "nix-editor": "nix-editor", + "nix-eval-jobs": "nix-eval-jobs", "nix-fast-build": "nix-fast-build", "nix2container": "nix2container", - "nixpkgs": "nixpkgs", - "nix-eval-jobs": "nix-eval-jobs", + "nixpkgs": "nixpkgs_2", "nixpkgs-go124": "nixpkgs-go124", - "nixpkgs-pgbackrest": "nixpkgs-pgbackrest", "rust-overlay": "rust-overlay", "treefmt-nix": "treefmt-nix_2" } @@ -424,11 +357,11 @@ ] }, "locked": { - "lastModified": 1750931469, - "narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=", + "lastModified": 1762938485, + "narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1", + "rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 85d13ded6..978c8b383 100644 --- a/flake.nix +++ b/flake.nix @@ -19,11 +19,9 @@ nix-fast-build.inputs.nixpkgs.follows = "nixpkgs"; nix-fast-build.inputs.treefmt-nix.follows = "treefmt-nix"; nix-fast-build.url = "github:Mic92/nix-fast-build"; - nix2container.inputs.flake-utils.follows = "flake-utils"; nix2container.inputs.nixpkgs.follows = "nixpkgs"; nix2container.url = "github:nlewo/nix2container"; nixpkgs-go124.url = "github:Nixos/nixpkgs/d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0"; - nixpkgs-pgbackrest.url = "github:nixos/nixpkgs/nixos-unstable-small"; nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; rust-overlay.url = "github:oxalica/rust-overlay"; diff --git a/nix/packages/default.nix b/nix/packages/default.nix index ed6bbdca4..bdc3e14ed 100644 --- a/nix/packages/default.nix +++ b/nix/packages/default.nix @@ -44,7 +44,7 @@ migrate-tool = pkgs.callPackage ./migrate-tool.nix { psql_15 = self'.packages."psql_15/bin"; }; overlayfs-on-package = pkgs.callPackage ./overlayfs-on-package.nix { }; packer = pkgs.callPackage ./packer.nix { inherit inputs; }; - pg-backrest = inputs.nixpkgs-pgbackrest.legacyPackages.${pkgs.system}.pgbackrest; + pg-backrest = inputs.nixpkgs.legacyPackages.${pkgs.system}.pgbackrest; pg-restore = pkgs.callPackage ./pg-restore.nix { psql_15 = self'.packages."psql_15/bin"; }; pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP; pg_regress = makePgRegress activeVersion; From dd809e4000296ae5c623f440962357579c974ba1 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Wed, 19 Nov 2025 14:13:49 +0100 Subject: [PATCH 23/52] fix: replace deprecated v8 package, and wrong packages arguments --- nix/ext/plv8/default.nix | 11 ++++++++++- nix/postgresql/generic.nix | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/nix/ext/plv8/default.nix b/nix/ext/plv8/default.nix index d858405ed..9b76d76f6 100644 --- a/nix/ext/plv8/default.nix +++ b/nix/ext/plv8/default.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchFromGitHub, - v8, + # v8, perl, postgresql, # For passthru test on various systems, and local development on macos @@ -36,6 +36,13 @@ let lib.mapAttrs (name: value: build name value.hash) supportedVersions ); + # plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8) + node_pkgs = import (fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz"; + sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v"; + }) { system = stdenv.system; }; + inherit (node_pkgs) v8; + # Build function for individual versions build = version: hash: @@ -43,6 +50,8 @@ let inherit pname version; #version = "3.1.10"; + v8 = (if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8); + src = fetchFromGitHub { owner = "plv8"; repo = "plv8"; diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index a4354d62b..1665207a8 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -65,6 +65,8 @@ let # detection of crypt fails when using llvm stdenv, so we add it manually # for <13 (where it got removed: https://github.com/postgres/postgres/commit/c45643d618e35ec2fe91438df15abd4f3c0d85ca) libxcrypt, + + isOrioleDB ? (builtins.match "[0-9][0-9]_.*" version) != null, }@args: let atLeast = lib.versionAtLeast version; @@ -78,8 +80,6 @@ let else (lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd); - isOrioleDB = (builtins.match "[0-9][0-9]_.*" version) != null; - pname = "postgresql"; stdenv' = if jitSupport then llvmPackages.stdenv else stdenv; From d40bbca4da8fb4e4052fd0a8154c019f4bb70895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Tue, 25 Nov 2025 18:15:27 +0000 Subject: [PATCH 24/52] chore: fix formatting --- nix/ext/gdal.nix | 17 +- nix/ext/pg_jsonschema/default.nix | 3 +- nix/ext/pg_net.nix | 3 +- nix/ext/pgaudit.nix | 26 ++- nix/ext/pgroonga.nix | 3 +- nix/ext/pgroonga/default.nix | 3 +- nix/ext/pgrouting.nix | 15 +- nix/ext/plv8.nix | 57 +++--- nix/ext/plv8/default.nix | 90 ++++----- nix/ext/postgis.nix | 3 +- nix/ext/tests/lib.py | 24 +-- nix/ext/timescaledb.nix | 3 +- nix/ext/vault.nix | 43 ++--- nix/ext/wrappers/default.nix | 3 +- nix/packages/groonga/default.nix | 29 ++- nix/packages/lib.nix | 13 +- nix/postgresql/generic.nix | 311 +++++++++++++++--------------- testinfra/test_ami_nix.py | 28 +-- 18 files changed, 331 insertions(+), 343 deletions(-) diff --git a/nix/ext/gdal.nix b/nix/ext/gdal.nix index 739f7e432..c4dba3e69 100644 --- a/nix/ext/gdal.nix +++ b/nix/ext/gdal.nix @@ -47,15 +47,14 @@ stdenv.mkDerivation rec { zlib ]; - cmakeFlags = - [ - "-DGDAL_USE_INTERNAL_LIBS=OFF" - "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include" - "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}" - "-DBUILD_PYTHON_BINDINGS=OFF" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ] - ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; + cmakeFlags = [ + "-DGDAL_USE_INTERNAL_LIBS=OFF" + "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include" + "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DBUILD_PYTHON_BINDINGS=OFF" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" ] + ++ lib.optionals stdenv.isDarwin [ "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; enableParallelBuilding = true; diff --git a/nix/ext/pg_jsonschema/default.nix b/nix/ext/pg_jsonschema/default.nix index 1a2e8ee58..84624300b 100644 --- a/nix/ext/pg_jsonschema/default.nix +++ b/nix/ext/pg_jsonschema/default.nix @@ -45,7 +45,8 @@ let nativeBuildInputs = [ cargo ]; buildInputs = [ postgresql - ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ] + ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; # update the following array when the pg_jsonschema version is updated # required to ensure that extensions update scripts from previous versions are generated diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix index 229971a81..d9f47aab8 100644 --- a/nix/ext/pg_net.nix +++ b/nix/ext/pg_net.nix @@ -20,7 +20,8 @@ let buildInputs = [ curl postgresql - ] ++ lib.optional (version == "0.6") libuv; + ] + ++ lib.optional (version == "0.6") libuv; src = fetchFromGitHub { owner = "supabase"; diff --git a/nix/ext/pgaudit.nix b/nix/ext/pgaudit.nix index 7660f2bd1..55dd237f7 100644 --- a/nix/ext/pgaudit.nix +++ b/nix/ext/pgaudit.nix @@ -184,22 +184,20 @@ buildEnv { echo "Found control version: $controlVer from package ${pkg}" # Create migrations from control version to all supported versions on this PG major - ${ - lib.concatMapStringsSep "\n" (targetVer: '' - # Skip if control version equals target version - if [[ "$controlVer" != "${targetVer}" ]]; then - # Skip if migration already exists - if [[ ! -f "$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql" ]]; then - # Create symlink to migration if target SQL exists - if [[ -f "$out/share/postgresql/extension/${pname}--${targetVer}.sql" ]]; then - echo "Creating migration symlink from control version $controlVer to ${targetVer}" - ln -s "$out/share/postgresql/extension/${pname}--${targetVer}.sql" \ - "$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql" - fi + ${lib.concatMapStringsSep "\n" (targetVer: '' + # Skip if control version equals target version + if [[ "$controlVer" != "${targetVer}" ]]; then + # Skip if migration already exists + if [[ ! -f "$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql" ]]; then + # Create symlink to migration if target SQL exists + if [[ -f "$out/share/postgresql/extension/${pname}--${targetVer}.sql" ]]; then + echo "Creating migration symlink from control version $controlVer to ${targetVer}" + ln -s "$out/share/postgresql/extension/${pname}--${targetVer}.sql" \ + "$out/share/postgresql/extension/${pname}--$controlVer--${targetVer}.sql" fi fi - '') versions - } + fi + '') versions} fi '') packages} diff --git a/nix/ext/pgroonga.nix b/nix/ext/pgroonga.nix index d57efc8fb..5d73d9ef8 100644 --- a/nix/ext/pgroonga.nix +++ b/nix/ext/pgroonga.nix @@ -28,7 +28,8 @@ stdenv.mkDerivation rec { msgpack-c supabase-groonga mecab - ] ++ lib.optionals stdenv.isDarwin [ xxHash ]; + ] + ++ lib.optionals stdenv.isDarwin [ xxHash ]; propagatedBuildInputs = [ supabase-groonga ]; configureFlags = [ diff --git a/nix/ext/pgroonga/default.nix b/nix/ext/pgroonga/default.nix index 22a8c2dfc..89aca72a2 100644 --- a/nix/ext/pgroonga/default.nix +++ b/nix/ext/pgroonga/default.nix @@ -57,7 +57,8 @@ let msgpack-c supabase-groonga mecab - ] ++ lib.optionals stdenv.isDarwin [ xxHash ]; + ] + ++ lib.optionals stdenv.isDarwin [ xxHash ]; propagatedBuildInputs = [ supabase-groonga diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting.nix index 48833791e..5690a4140 100644 --- a/nix/ext/pgrouting.nix +++ b/nix/ext/pgrouting.nix @@ -54,13 +54,14 @@ let stdenv.isDarwin && lib.versionAtLeast postgresql.version "16" ) "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types"; - cmakeFlags = - [ "-DPOSTGRESQL_VERSION=${postgresql.version}" ] - ++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [ - "-DCMAKE_MACOSX_RPATH=ON" - "-DCMAKE_SHARED_MODULE_SUFFIX=.dylib" - "-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib" - ]; + cmakeFlags = [ + "-DPOSTGRESQL_VERSION=${postgresql.version}" + ] + ++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [ + "-DCMAKE_MACOSX_RPATH=ON" + "-DCMAKE_SHARED_MODULE_SUFFIX=.dylib" + "-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib" + ]; preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") '' export DLSUFFIX=.dylib diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix index 26ff03a01..72795ac92 100644 --- a/nix/ext/plv8.nix +++ b/nix/ext/plv8.nix @@ -37,33 +37,34 @@ stdenv.mkDerivation (finalAttrs: { ./0001-build-Allow-using-V8-from-system.patch ]; - nativeBuildInputs = - [ perl ] - ++ lib.optionals stdenv.isDarwin [ - clang - xcbuild - ]; + nativeBuildInputs = [ + perl + ] + ++ lib.optionals stdenv.isDarwin [ + clang + xcbuild + ]; buildInputs = [ v8 postgresql - ] ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; + ] + ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; buildFlags = [ "all" ]; - makeFlags = - [ - # Nixpkgs build a v8 monolith instead of separate v8_libplatform. - "USE_SYSTEM_V8=1" - "V8_OUTDIR=${v8}/lib" - "PG_CONFIG=${postgresql}/bin/pg_config" - ] - ++ lib.optionals stdenv.isDarwin [ - "CC=${clang}/bin/clang" - "CXX=${clang}/bin/clang++" - "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; + makeFlags = [ + # Nixpkgs build a v8 monolith instead of separate v8_libplatform. + "USE_SYSTEM_V8=1" + "V8_OUTDIR=${v8}/lib" + "PG_CONFIG=${postgresql}/bin/pg_config" + ] + ++ lib.optionals stdenv.isDarwin [ + "CC=${clang}/bin/clang" + "CXX=${clang}/bin/clang++" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; NIX_LDFLAGS = ( lib.optionals stdenv.isDarwin [ @@ -124,11 +125,9 @@ stdenv.mkDerivation (finalAttrs: { install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8.so ''} - ${ - lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so - '' - } + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so + ''} else ${lib.optionalString stdenv.isDarwin '' install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} @@ -137,11 +136,9 @@ stdenv.mkDerivation (finalAttrs: { install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} ''} - ${ - lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} - '' - } + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + ''} fi ''; diff --git a/nix/ext/plv8/default.nix b/nix/ext/plv8/default.nix index 9b76d76f6..5dd79fa7d 100644 --- a/nix/ext/plv8/default.nix +++ b/nix/ext/plv8/default.nix @@ -59,49 +59,47 @@ let inherit hash; }; - patches = - [ - # Allow building with system v8. - # https://github.com/plv8/plv8/pull/505 (rejected) - ./0001-build-Allow-using-V8-from-system-${version}.patch - ] - ++ lib.optionals (builtins.compareVersions "3.1.10" version >= 0) [ - # Apply https://github.com/plv8/plv8/pull/552/ patch to fix extension upgrade problems - ./0001-fix-upgrade-related-woes-with-GUC-redefinitions-${version}.patch - ]; + patches = [ + # Allow building with system v8. + # https://github.com/plv8/plv8/pull/505 (rejected) + ./0001-build-Allow-using-V8-from-system-${version}.patch + ] + ++ lib.optionals (builtins.compareVersions "3.1.10" version >= 0) [ + # Apply https://github.com/plv8/plv8/pull/552/ patch to fix extension upgrade problems + ./0001-fix-upgrade-related-woes-with-GUC-redefinitions-${version}.patch + ]; - nativeBuildInputs = - [ perl ] - ++ lib.optionals stdenv.isDarwin [ - clang - xcbuild - ]; + nativeBuildInputs = [ + perl + ] + ++ lib.optionals stdenv.isDarwin [ + clang + xcbuild + ]; - buildInputs = - [ - (if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8) - postgresql - ] - ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.Kerberos - ]; + buildInputs = [ + (if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8) + postgresql + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Kerberos + ]; buildFlags = [ "all" ]; - makeFlags = - [ - # Nixpkgs build a v8 monolith instead of separate v8_libplatform. - "USE_SYSTEM_V8=1" - "V8_OUTDIR=${v8}/lib" - "PG_CONFIG=${postgresql}/bin/pg_config" - ] - ++ lib.optionals stdenv.isDarwin [ - "CC=${clang}/bin/clang" - "CXX=${clang}/bin/clang++" - "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; + makeFlags = [ + # Nixpkgs build a v8 monolith instead of separate v8_libplatform. + "USE_SYSTEM_V8=1" + "V8_OUTDIR=${v8}/lib" + "PG_CONFIG=${postgresql}/bin/pg_config" + ] + ++ lib.optionals stdenv.isDarwin [ + "CC=${clang}/bin/clang" + "CXX=${clang}/bin/clang++" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + ] + ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; NIX_LDFLAGS = lib.optionals stdenv.isDarwin [ "-L${postgresql}/lib" @@ -153,11 +151,9 @@ let install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/$LIB_NAME ''} - ${ - lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME - '' - } + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME + ''} else ${lib.optionalString stdenv.isDarwin '' install_name_tool -add_rpath "${v8}/lib" $out/lib/$LIB_NAME @@ -166,11 +162,9 @@ let install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/$LIB_NAME ''} - ${ - lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME - '' - } + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${libcxx}/lib" $out/lib/$LIB_NAME + ''} fi # plv8 3.2.x removed support for coffeejs and livescript diff --git a/nix/ext/postgis.nix b/nix/ext/postgis.nix index cdf48fb24..a8dd831a1 100644 --- a/nix/ext/postgis.nix +++ b/nix/ext/postgis.nix @@ -79,7 +79,8 @@ let protobufc pcre2.dev sfcgal - ] ++ lib.optional stdenv.isDarwin libiconv; + ] + ++ lib.optional stdenv.isDarwin libiconv; nativeBuildInputs = [ perl pkg-config diff --git a/nix/ext/tests/lib.py b/nix/ext/tests/lib.py index e01f5f234..46db7d241 100644 --- a/nix/ext/tests/lib.py +++ b/nix/ext/tests/lib.py @@ -93,9 +93,9 @@ def assert_version_matches(self, expected_version: str): AssertionError: If the installed version does not match the expected version """ installed_version = self.get_installed_version() - assert ( - installed_version == expected_version - ), f"Expected version {expected_version}, but found {installed_version}" + assert installed_version == expected_version, ( + f"Expected version {expected_version}, but found {installed_version}" + ) def check_upgrade_path(self, pg_version: str): """Test the complete upgrade path for a PostgreSQL version. @@ -163,9 +163,9 @@ def check_switch_extension_with_background_worker( f"No versions available for PostgreSQL version {pg_version}" ) last_version = available_versions[-1] - assert ext_version.endswith( - f"{last_version}.so" - ), f"Expected {self.extension_name} version {last_version}, but found {ext_version}" + assert ext_version.endswith(f"{last_version}.so"), ( + f"Expected {self.extension_name} version {last_version}, but found {ext_version}" + ) # Switch to the first version first_version = available_versions[0] @@ -173,14 +173,14 @@ def check_switch_extension_with_background_worker( # Check that we are using the first version now ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip() - assert ext_version.endswith( - f"{first_version}.so" - ), f"Expected {self.extension_name} version {first_version}, but found {ext_version}" + assert ext_version.endswith(f"{first_version}.so"), ( + f"Expected {self.extension_name} version {first_version}, but found {ext_version}" + ) # Switch to the last version self.vm.succeed(f"switch_{self.extension_name}_version {last_version}") # Check that we are using the last version now ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip() - assert ext_version.endswith( - f"{self.extension_name}-{last_version}.so" - ), f"Expected {self.extension_name} version {last_version}, but found {ext_version}" + assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), ( + f"Expected {self.extension_name} version {last_version}, but found {ext_version}" + ) diff --git a/nix/ext/timescaledb.nix b/nix/ext/timescaledb.nix index 91605a48c..8c42aaaef 100644 --- a/nix/ext/timescaledb.nix +++ b/nix/ext/timescaledb.nix @@ -39,7 +39,8 @@ let "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" "-DAPACHE_ONLY=1" - ] ++ lib.optionals stdenv.isDarwin [ "-DLINTER=OFF" ]; + ] + ++ lib.optionals stdenv.isDarwin [ "-DLINTER=OFF" ]; postPatch = '' for x in CMakeLists.txt sql/CMakeLists.txt; do diff --git a/nix/ext/vault.nix b/nix/ext/vault.nix index cb90882a7..537febc0b 100644 --- a/nix/ext/vault.nix +++ b/nix/ext/vault.nix @@ -44,31 +44,30 @@ let inherit hash; }; - installPhase = - '' - mkdir -p $out/{lib,share/postgresql/extension} + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} - # Create version-specific control file - sed -e "/^default_version =/d" \ - -e "s|^module_pathname = .*|module_pathname = '\$libdir/${pname}'|" \ - ${pname}.control > $out/share/postgresql/extension/${pname}--${version}.control + # Create version-specific control file + sed -e "/^default_version =/d" \ + -e "s|^module_pathname = .*|module_pathname = '\$libdir/${pname}'|" \ + ${pname}.control > $out/share/postgresql/extension/${pname}--${version}.control - '' - # for versions <= 0.2.8, we don't have a library to install - + lib.optionalString (builtins.compareVersions "0.2.8" version < 0) '' - # Install shared library with version suffix - mv ${pname}${postgresql.dlSuffix} $out/lib/${pname}-${version}${postgresql.dlSuffix} + '' + # for versions <= 0.2.8, we don't have a library to install + + lib.optionalString (builtins.compareVersions "0.2.8" version < 0) '' + # Install shared library with version suffix + mv ${pname}${postgresql.dlSuffix} $out/lib/${pname}-${version}${postgresql.dlSuffix} - # For the latest version, copy the sql files - if [[ "${version}" == "${latestVersion}" ]]; then - install -D -t $out/share/postgresql/extension sql/*.sql - { - echo "default_version = '${latestVersion}'" - cat $out/share/postgresql/extension/${pname}--${latestVersion}.control - } > $out/share/postgresql/extension/${pname}.control - fi - ln -sfn ${pname}-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix} - ''; + # For the latest version, copy the sql files + if [[ "${version}" == "${latestVersion}" ]]; then + install -D -t $out/share/postgresql/extension sql/*.sql + { + echo "default_version = '${latestVersion}'" + cat $out/share/postgresql/extension/${pname}--${latestVersion}.control + } > $out/share/postgresql/extension/${pname}.control + fi + ln -sfn ${pname}-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix} + ''; meta = with lib; { description = "Store encrypted secrets in PostgreSQL"; diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index 2bbc3e888..2a44590b6 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -40,7 +40,8 @@ let buildInputs = [ openssl postgresql - ] ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; + ] + ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; NIX_LDFLAGS = "-L${postgresql}/lib -lpq"; diff --git a/nix/packages/groonga/default.nix b/nix/packages/groonga/default.nix index bef491109..c6d734db6 100644 --- a/nix/packages/groonga/default.nix +++ b/nix/packages/groonga/default.nix @@ -36,21 +36,20 @@ stdenv.mkDerivation (finalAttrs: { pkg-config makeWrapper ]; - buildInputs = - [ - rapidjson - xxHash - zstd - mecab - kytea - msgpack-c - ] - ++ lib.optionals lz4Support [ lz4 ] - ++ lib.optional zlibSupport [ zlib ] - ++ lib.optionals suggestSupport [ - zeromq - libevent - ]; + buildInputs = [ + rapidjson + xxHash + zstd + mecab + kytea + msgpack-c + ] + ++ lib.optionals lz4Support [ lz4 ] + ++ lib.optional zlibSupport [ zlib ] + ++ lib.optionals suggestSupport [ + zeromq + libevent + ]; cmakeFlags = [ "-DWITH_MECAB=ON" "-DMECAB_DICDIR=${mecab-naist-jdic}/lib/mecab/dic/naist-jdic" diff --git a/nix/packages/lib.nix b/nix/packages/lib.nix index cf541913d..ef8f64069 100644 --- a/nix/packages/lib.nix +++ b/nix/packages/lib.nix @@ -100,7 +100,8 @@ PGBOUNCER_AUTH_SCHEMA_SQL = "${paths.pgbouncerAuthSchemaSql}"; STAT_EXTENSION_SQL = "${paths.statExtensionSql}"; CURRENT_SYSTEM = "${system}"; - } // extraSubstitutions; # Merge in any extra substitutions + } + // extraSubstitutions; # Merge in any extra substitutions in pkgs.runCommand name { @@ -129,13 +130,11 @@ chmod 644 $out/etc/postgresql/pg_hba.conf substitute ${../tools/run-server.sh.in} $out/bin/start-postgres-server \ - ${ - builtins.concatStringsSep " " ( - builtins.attrValues ( - builtins.mapAttrs (name: value: "--subst-var-by '${name}' '${value}'") substitutions - ) + ${builtins.concatStringsSep " " ( + builtins.attrValues ( + builtins.mapAttrs (name: value: "--subst-var-by '${name}' '${value}'") substitutions ) - } + )} chmod +x $out/bin/start-postgres-server ''; } diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 1665207a8..a0317be95 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -108,45 +108,43 @@ let ]; setOutputFlags = false; # $out retains configureFlags :-/ - buildInputs = - [ - zlib - readline - openssl - (libxml2.override { python3 = python3; }) - # Pin ICU to version 75 to maintain collation version 153.120 - # This prevents collation mismatch warnings when upgrading nixpkgs - icu75 - ] - ++ lib.optionals (olderThan "13") [ libxcrypt ] - ++ lib.optionals jitSupport [ llvmPackages.llvm ] - ++ lib.optionals lz4Enabled [ lz4 ] - ++ lib.optionals zstdEnabled [ zstd ] - ++ lib.optionals systemdSupport' [ systemd ] - ++ lib.optionals pythonSupport [ python3 ] - ++ lib.optionals gssSupport [ libkrb5 ] - ++ lib.optionals stdenv'.isLinux [ linux-pam ] - ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] - ++ lib.optionals (isOrioleDB || (lib.versionAtLeast version "17")) [ - perl - bison - flex - docbook_xsl - docbook_xml_dtd_45 - docbook_xsl_ns - libxslt - ]; + buildInputs = [ + zlib + readline + openssl + (libxml2.override { python3 = python3; }) + # Pin ICU to version 75 to maintain collation version 153.120 + # This prevents collation mismatch warnings when upgrading nixpkgs + icu75 + ] + ++ lib.optionals (olderThan "13") [ libxcrypt ] + ++ lib.optionals jitSupport [ llvmPackages.llvm ] + ++ lib.optionals lz4Enabled [ lz4 ] + ++ lib.optionals zstdEnabled [ zstd ] + ++ lib.optionals systemdSupport' [ systemd ] + ++ lib.optionals pythonSupport [ python3 ] + ++ lib.optionals gssSupport [ libkrb5 ] + ++ lib.optionals stdenv'.isLinux [ linux-pam ] + ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] + ++ lib.optionals (isOrioleDB || (lib.versionAtLeast version "17")) [ + perl + bison + flex + docbook_xsl + docbook_xml_dtd_45 + docbook_xsl_ns + libxslt + ]; - nativeBuildInputs = - [ - makeWrapper - pkg-config - ] - ++ lib.optionals jitSupport [ - llvmPackages.llvm.dev - nukeReferences - patchelf - ]; + nativeBuildInputs = [ + makeWrapper + pkg-config + ] + ++ lib.optionals jitSupport [ + llvmPackages.llvm.dev + nukeReferences + patchelf + ]; enableParallelBuilding = true; @@ -159,116 +157,112 @@ let # Fixed upstream in https://github.com/postgres/postgres/commit/0bc8cebdb889368abdf224aeac8bc197fe4c9ae6 env.NIX_CFLAGS_COMPILE = lib.optionalString (olderThan "13") "-I${libxml2.dev}/include/libxml2"; - configureFlags = - [ - "--with-openssl" - "--with-libxml" - "--with-icu" - "--sysconfdir=/etc" - "--libdir=$(lib)/lib" - "--with-system-tzdata=${tzdata}/share/zoneinfo" - "--enable-debug" - (lib.optionalString systemdSupport' "--with-systemd") - (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") - ] - ++ lib.optionals lz4Enabled [ "--with-lz4" ] - ++ lib.optionals zstdEnabled [ "--with-zstd" ] - ++ lib.optionals gssSupport [ "--with-gssapi" ] - ++ lib.optionals pythonSupport [ "--with-python" ] - ++ lib.optionals jitSupport [ "--with-llvm" ] - ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; - - patches = - [ - ( - if atLeast "16" then - ./patches/relative-to-symlinks-16+.patch - else - ./patches/relative-to-symlinks.patch - ) - ./patches/less-is-more.patch - ./patches/paths-for-split-outputs.patch - ./patches/specify_pkglibdir_at_runtime.patch - ./patches/paths-with-postgresql-suffix.patch - - (replaceVars ./patches/locale-binary-path.patch { - locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; - }) - ] - ++ lib.optionals stdenv'.hostPlatform.isMusl ( - # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 - map fetchurl (lib.attrValues muslPatches) + configureFlags = [ + "--with-openssl" + "--with-libxml" + "--with-icu" + "--sysconfdir=/etc" + "--libdir=$(lib)/lib" + "--with-system-tzdata=${tzdata}/share/zoneinfo" + "--enable-debug" + (lib.optionalString systemdSupport' "--with-systemd") + (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") + ] + ++ lib.optionals lz4Enabled [ "--with-lz4" ] + ++ lib.optionals zstdEnabled [ "--with-zstd" ] + ++ lib.optionals gssSupport [ "--with-gssapi" ] + ++ lib.optionals pythonSupport [ "--with-python" ] + ++ lib.optionals jitSupport [ "--with-llvm" ] + ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; + + patches = [ + ( + if atLeast "16" then + ./patches/relative-to-symlinks-16+.patch + else + ./patches/relative-to-symlinks.patch ) - ++ lib.optionals stdenv'.isLinux [ - (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) - ]; + ./patches/less-is-more.patch + ./patches/paths-for-split-outputs.patch + ./patches/specify_pkglibdir_at_runtime.patch + ./patches/paths-with-postgresql-suffix.patch + + (replaceVars ./patches/locale-binary-path.patch { + locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; + }) + ] + ++ lib.optionals stdenv'.hostPlatform.isMusl ( + # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 + map fetchurl (lib.attrValues muslPatches) + ) + ++ lib.optionals stdenv'.isLinux [ + (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) + ]; installTargets = [ "install-world-bin" ]; - postPatch = - '' - # Hardcode the path to pgxs so pg_config returns the path in $out - substituteInPlace "src/common/config_info.c" --subst-var out - substituteInPlace "src/backend/commands/collationcmds.c" --replace-fail '@locale@' '${ - if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc - }/bin/locale' - '' - + lib.optionalString jitSupport '' - # Force lookup of jit stuff in $out instead of $lib - substituteInPlace src/backend/jit/jit.c --replace pkglib_path \"$out/lib\" - substituteInPlace src/backend/jit/llvm/llvmjit.c --replace pkglib_path \"$out/lib\" - substituteInPlace src/backend/jit/llvm/llvmjit_inline.cpp --replace pkglib_path \"$out/lib\" - ''; - - postInstall = - '' - moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it - moveToOutput "lib/libpgcommon*.a" "$out" - moveToOutput "lib/libpgport*.a" "$out" - moveToOutput "lib/libecpg*" "$out" - - # Prevent a retained dependency on gcc-wrapper. - substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/ld ld - - if [ -z "''${dontDisableStatic:-}" ]; then - # Remove static libraries in case dynamic are available. - for i in $out/lib/*.a $lib/lib/*.a; do - name="$(basename "$i")" - ext="${stdenv'.hostPlatform.extensions.sharedLibrary}" - if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then - rm "$i" - fi - done - fi - '' - + lib.optionalString jitSupport '' - # Move the bitcode and libllvmjit.so library out of $lib; otherwise, every client that - # depends on libpq.so will also have libLLVM.so in its closure too, bloating it - moveToOutput "lib/bitcode" "$out" - moveToOutput "lib/llvmjit*" "$out" - - # In the case of JIT support, prevent a retained dependency on clang-wrapper - substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang - nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) - - # Stop out depending on the default output of llvm - substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${llvmPackages.llvm.out}/bin "" \ - --replace '$(LLVM_BINPATH)/' "" - - # Stop out depending on the -dev output of llvm - substituteInPlace $out/lib/pgxs/src/Makefile.global \ - --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ - --replace -I${llvmPackages.llvm.dev}/include "" - - ${lib.optionalString (!stdenv'.isDarwin) '' - # Stop lib depending on the -dev output of llvm - rpath=$(patchelf --print-rpath $out/lib/llvmjit.so) - nuke-refs -e $out $out/lib/llvmjit.so - # Restore the correct rpath - patchelf $out/lib/llvmjit.so --set-rpath "$rpath" - ''} - ''; + postPatch = '' + # Hardcode the path to pgxs so pg_config returns the path in $out + substituteInPlace "src/common/config_info.c" --subst-var out + substituteInPlace "src/backend/commands/collationcmds.c" --replace-fail '@locale@' '${ + if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc + }/bin/locale' + '' + + lib.optionalString jitSupport '' + # Force lookup of jit stuff in $out instead of $lib + substituteInPlace src/backend/jit/jit.c --replace pkglib_path \"$out/lib\" + substituteInPlace src/backend/jit/llvm/llvmjit.c --replace pkglib_path \"$out/lib\" + substituteInPlace src/backend/jit/llvm/llvmjit_inline.cpp --replace pkglib_path \"$out/lib\" + ''; + + postInstall = '' + moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it + moveToOutput "lib/libpgcommon*.a" "$out" + moveToOutput "lib/libpgport*.a" "$out" + moveToOutput "lib/libecpg*" "$out" + + # Prevent a retained dependency on gcc-wrapper. + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/ld ld + + if [ -z "''${dontDisableStatic:-}" ]; then + # Remove static libraries in case dynamic are available. + for i in $out/lib/*.a $lib/lib/*.a; do + name="$(basename "$i")" + ext="${stdenv'.hostPlatform.extensions.sharedLibrary}" + if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then + rm "$i" + fi + done + fi + '' + + lib.optionalString jitSupport '' + # Move the bitcode and libllvmjit.so library out of $lib; otherwise, every client that + # depends on libpq.so will also have libLLVM.so in its closure too, bloating it + moveToOutput "lib/bitcode" "$out" + moveToOutput "lib/llvmjit*" "$out" + + # In the case of JIT support, prevent a retained dependency on clang-wrapper + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang + nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) + + # Stop out depending on the default output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.out}/bin "" \ + --replace '$(LLVM_BINPATH)/' "" + + # Stop out depending on the -dev output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ + --replace -I${llvmPackages.llvm.dev}/include "" + + ${lib.optionalString (!stdenv'.isDarwin) '' + # Stop lib depending on the -dev output of llvm + rpath=$(patchelf --print-rpath $out/lib/llvmjit.so) + nuke-refs -e $out $out/lib/llvmjit.so + # Restore the correct rpath + patchelf $out/lib/llvmjit.so --set-rpath "$rpath" + ''} + ''; postFixup = lib.optionalString (!stdenv'.isDarwin && stdenv'.hostPlatform.libc == "glibc") '' # initdb needs access to "locale" command from glibc. @@ -322,22 +316,21 @@ let postgresql = this; } this.pkgs; - tests = - { - postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { - inherit (stdenv) system; - pkgs = self; - package = this; - }; - pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - } - // lib.optionalAttrs jitSupport { - postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { - inherit (stdenv) system; - pkgs = self; - package = this; - }; + tests = { + postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { + inherit (stdenv) system; + pkgs = self; + package = this; }; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + } + // lib.optionalAttrs jitSupport { + postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; + }; }; meta = with lib; { diff --git a/testinfra/test_ami_nix.py b/testinfra/test_ami_nix.py index 1b00f2c84..a5cadcad9 100644 --- a/testinfra/test_ami_nix.py +++ b/testinfra/test_ami_nix.py @@ -421,9 +421,9 @@ def is_healthy(ssh) -> bool: def test_postgrest_is_running(host): """Check if postgrest service is running using our SSH connection.""" result = run_ssh_command(host["ssh"], "systemctl is-active postgrest") - assert ( - result["succeeded"] and result["stdout"].strip() == "active" - ), "PostgREST service is not running" + assert result["succeeded"] and result["stdout"].strip() == "active", ( + "PostgREST service is not running" + ) def test_postgrest_responds_to_requests(host): @@ -546,9 +546,9 @@ def test_postgresql_version(host): if version_match: major_version = int(version_match.group(1)) print(f"PostgreSQL major version: {major_version}") - assert ( - major_version >= 14 - ), f"PostgreSQL version {major_version} is less than 14" + assert major_version >= 14, ( + f"PostgreSQL version {major_version} is less than 14" + ) else: assert False, "Could not parse PostgreSQL version number" else: @@ -578,9 +578,9 @@ def test_libpq5_version(host): if version_match: major_version = int(version_match.group(1)) print(f"libpq5 major version: {major_version}") - assert ( - major_version >= 14 - ), f"libpq5 version {major_version} is less than 14" + assert major_version >= 14, ( + f"libpq5 version {major_version} is less than 14" + ) else: print("Could not parse libpq5 version from dpkg output") else: @@ -613,9 +613,9 @@ def test_libpq5_version(host): if version_match: major_version = int(version_match.group(1)) print(f"psql/libpq major version: {major_version}") - assert ( - major_version >= 14 - ), f"psql/libpq version {major_version} is less than 14" + assert major_version >= 14, ( + f"psql/libpq version {major_version} is less than 14" + ) else: print("Could not parse psql version") @@ -776,7 +776,9 @@ def test_postgrest_read_only_session_attrs(host): print( f"\nFound 'session is not read-only' errors in PostgREST logs:\n{result['stdout']}" ) - assert False, "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode" + assert False, ( + "PostgREST logs contain 'session is not read-only' errors even though PostgreSQL is configured for read-only mode" + ) else: print("\nNo 'session is not read-only' errors found in PostgREST logs") From ea3cf1e01f968e9d7c4902c659b38a1261a6eece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Tue, 25 Nov 2025 18:18:23 +0000 Subject: [PATCH 25/52] fix(darwin): remove reference to apple-sdk --- nix/cargo-pgrx/default.nix | 5 +---- nix/ext/pg_jsonschema/default.nix | 4 +--- nix/ext/plv8.nix | 4 +--- nix/ext/plv8/default.nix | 7 ------- nix/ext/wrappers/default.nix | 4 +--- nix/overlays/default.nix | 1 - nix/packages/packer.nix | 2 -- 7 files changed, 4 insertions(+), 23 deletions(-) diff --git a/nix/cargo-pgrx/default.nix b/nix/cargo-pgrx/default.nix index e87d3c97d..87dbf6fe1 100644 --- a/nix/cargo-pgrx/default.nix +++ b/nix/cargo-pgrx/default.nix @@ -1,6 +1,5 @@ { lib, - apple-sdk_11, fetchCrate, openssl, pkg-config, @@ -34,9 +33,7 @@ let src = fetchCrate { inherit version pname hash; }; inherit cargoHash; nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ]; - buildInputs = - lib.optionals stdenv.hostPlatform.isLinux [ openssl ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ]; OPENSSL_DIR = "${openssl.dev}"; OPENSSL_INCLUDE_DIR = "${openssl.dev}/include"; diff --git a/nix/ext/pg_jsonschema/default.nix b/nix/ext/pg_jsonschema/default.nix index 84624300b..4578517d1 100644 --- a/nix/ext/pg_jsonschema/default.nix +++ b/nix/ext/pg_jsonschema/default.nix @@ -6,7 +6,6 @@ fetchFromGitHub, postgresql, rust-bin, - darwin, }: let pname = "pg_jsonschema"; @@ -45,8 +44,7 @@ let nativeBuildInputs = [ cargo ]; buildInputs = [ postgresql - ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ]; + ]; # update the following array when the pg_jsonschema version is updated # required to ensure that extensions update scripts from previous versions are generated diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix index 72795ac92..fd7252ba4 100644 --- a/nix/ext/plv8.nix +++ b/nix/ext/plv8.nix @@ -9,7 +9,6 @@ # to nixpkgs clang, xcbuild, - apple-sdk_11, patchelf, }: let @@ -48,8 +47,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ v8 postgresql - ] - ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; + ]; buildFlags = [ "all" ]; diff --git a/nix/ext/plv8/default.nix b/nix/ext/plv8/default.nix index 5dd79fa7d..71f1dcf22 100644 --- a/nix/ext/plv8/default.nix +++ b/nix/ext/plv8/default.nix @@ -10,7 +10,6 @@ # to nixpkgs clang, xcbuild, - darwin, patchelf, buildEnv, nodejs_20, @@ -80,10 +79,6 @@ let buildInputs = [ (if (builtins.compareVersions "3.1.10" version >= 0) then v8 else nodejs_20.libv8) postgresql - ] - ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.Kerberos ]; buildFlags = [ "all" ]; @@ -108,10 +103,8 @@ let "-lpq" "-lpgcommon" "-lpgport" - "-F${darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks" "-framework" "CoreFoundation" - "-F${darwin.apple_sdk.frameworks.Kerberos}/Library/Frameworks" "-framework" "Kerberos" "-undefined" diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index 2a44590b6..696358ea4 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -7,7 +7,6 @@ pkg-config, postgresql, buildEnv, - apple-sdk_11, rust-bin, git, }: @@ -40,8 +39,7 @@ let buildInputs = [ openssl postgresql - ] - ++ lib.optionals stdenv.isDarwin [ apple-sdk_11 ]; + ]; NIX_LDFLAGS = "-L${postgresql}/lib -lpq"; diff --git a/nix/overlays/default.nix b/nix/overlays/default.nix index 4e3620503..71e8d92d5 100644 --- a/nix/overlays/default.nix +++ b/nix/overlays/default.nix @@ -19,7 +19,6 @@ cargo-pgrx = final.callPackage ../cargo-pgrx/default.nix { inherit (final) lib; - inherit (final) apple-sdk_11; inherit (final) fetchCrate; inherit (final) openssl; inherit (final) pkg-config; diff --git a/nix/packages/packer.nix b/nix/packages/packer.nix index 475713469..0fd18d8de 100644 --- a/nix/packages/packer.nix +++ b/nix/packages/packer.nix @@ -32,8 +32,6 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - buildInputs = lib.optionals pkgs.stdenv.isDarwin [ pkgs.apple-sdk_11 ]; - postInstall = '' installShellCompletion --zsh contrib/zsh-completion/_packer ''; From 1f6c774df87dc002feb37d8868f8ce79898fbd86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Wed, 26 Nov 2025 01:17:28 +0100 Subject: [PATCH 26/52] fix(ext): missing required attributes in some extension tests --- nix/ext/tests/http.nix | 3 +++ nix/ext/tests/orioledb.nix | 3 +++ nix/ext/tests/pg_plan_filter.nix | 3 +++ nix/ext/tests/pg_repack.nix | 3 +++ nix/ext/tests/pg_safeupdate.nix | 3 +++ nix/ext/tests/pgjwt.nix | 3 +++ nix/ext/tests/pgmq.nix | 3 +++ nix/ext/tests/pgroonga.nix | 3 +++ nix/ext/tests/pgrouting.nix | 3 +++ nix/ext/tests/pgsodium.nix | 3 +++ nix/ext/tests/plpgsql_check.nix | 3 +++ nix/ext/tests/plv8.nix | 3 +++ nix/ext/tests/postgis.nix | 3 +++ nix/ext/tests/timescaledb.nix | 3 +++ nix/ext/tests/vault.nix | 3 +++ 15 files changed, 45 insertions(+) diff --git a/nix/ext/tests/http.nix b/nix/ext/tests/http.nix index f465da254..1477b6c4a 100644 --- a/nix/ext/tests/http.nix +++ b/nix/ext/tests/http.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/orioledb.nix b/nix/ext/tests/orioledb.nix index 7d0475cef..bf1c930cb 100644 --- a/nix/ext/tests/orioledb.nix +++ b/nix/ext/tests/orioledb.nix @@ -15,8 +15,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ self.packages.${pkgs.system}."psql_orioledb-17/exts/orioledb" ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pg_plan_filter.nix b/nix/ext/tests/pg_plan_filter.nix index c9efb4809..677c30ae3 100644 --- a/nix/ext/tests/pg_plan_filter.nix +++ b/nix/ext/tests/pg_plan_filter.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pg_repack.nix b/nix/ext/tests/pg_repack.nix index ff06a9b45..c02674d74 100644 --- a/nix/ext/tests/pg_repack.nix +++ b/nix/ext/tests/pg_repack.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pg_safeupdate.nix b/nix/ext/tests/pg_safeupdate.nix index 1c7e09c7f..a4431cfa5 100644 --- a/nix/ext/tests/pg_safeupdate.nix +++ b/nix/ext/tests/pg_safeupdate.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pgjwt.nix b/nix/ext/tests/pgjwt.nix index ef2e6b935..aede7e9a0 100644 --- a/nix/ext/tests/pgjwt.nix +++ b/nix/ext/tests/pgjwt.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pgmq.nix b/nix/ext/tests/pgmq.nix index b0c432921..7d96e057c 100644 --- a/nix/ext/tests/pgmq.nix +++ b/nix/ext/tests/pgmq.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pgroonga.nix b/nix/ext/tests/pgroonga.nix index abfef8804..f40da3367 100644 --- a/nix/ext/tests/pgroonga.nix +++ b/nix/ext/tests/pgroonga.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pgrouting.nix b/nix/ext/tests/pgrouting.nix index f4550b576..e50c81950 100644 --- a/nix/ext/tests/pgrouting.nix +++ b/nix/ext/tests/pgrouting.nix @@ -24,8 +24,11 @@ let ); passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/pgsodium.nix b/nix/ext/tests/pgsodium.nix index 0eae3c0a0..8fb945eeb 100644 --- a/nix/ext/tests/pgsodium.nix +++ b/nix/ext/tests/pgsodium.nix @@ -20,8 +20,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/plpgsql_check.nix b/nix/ext/tests/plpgsql_check.nix index 4d964ad9f..422a37982 100644 --- a/nix/ext/tests/plpgsql_check.nix +++ b/nix/ext/tests/plpgsql_check.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/plv8.nix b/nix/ext/tests/plv8.nix index 26a349637..38c3a51b1 100644 --- a/nix/ext/tests/plv8.nix +++ b/nix/ext/tests/plv8.nix @@ -20,8 +20,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/postgis.nix b/nix/ext/tests/postgis.nix index f20e2de24..68bcbe381 100644 --- a/nix/ext/tests/postgis.nix +++ b/nix/ext/tests/postgis.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/timescaledb.nix b/nix/ext/tests/timescaledb.nix index 0cea7a507..56e3a6dbf 100644 --- a/nix/ext/tests/timescaledb.nix +++ b/nix/ext/tests/timescaledb.nix @@ -19,8 +19,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ diff --git a/nix/ext/tests/vault.nix b/nix/ext/tests/vault.nix index a3f9cb24f..763f85f84 100644 --- a/nix/ext/tests/vault.nix +++ b/nix/ext/tests/vault.nix @@ -20,8 +20,11 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; + installedExtensions = [ (installedExtension majorVersion) ]; lib = pkg; withPackages = _: pkg; + withJIT = pkg; + withoutJIT = pkg; }; nativeBuildInputs = [ pkgs.makeWrapper ]; pathsToLink = [ From af66e0d677ea6425840ae425bb3909d148bb922b Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:17:31 +0100 Subject: [PATCH 27/52] chore: % nix flake update && nix fmt Updated nixpkgs, rust-overlay, and nix-fast-build to latest versions. --- flake.lock | 26 +++++++++++++------------- nix/ext/tests/pgrouting.nix | 19 +++++++++---------- nix/overlays/default.nix | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index f88628c0d..9b458ab1e 100644 --- a/flake.lock +++ b/flake.lock @@ -82,11 +82,11 @@ ] }, "locked": { - "lastModified": 1763988335, - "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", + "lastModified": 1765016596, + "narHash": "sha256-rhSqPNxDVow7OQKi4qS5H8Au0P4S3AYbawBSmJNUtBQ=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", + "rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c", "type": "github" }, "original": { @@ -189,11 +189,11 @@ ] }, "locked": { - "lastModified": 1763989204, - "narHash": "sha256-StOlm5JOQzgTR1pJkOf0+Qu7WMtvZuJg6BGvo+lud8E=", + "lastModified": 1764473437, + "narHash": "sha256-fJPxdBX25HuY9hb2NDo2prKRC103zHMseCEeFW1bKIw=", "owner": "Mic92", "repo": "nix-fast-build", - "rev": "143a477474c7a1818d525eb622551eb79da3eb95", + "rev": "b26ad640fa008af685c1efd7662ddd7a619e4a6d", "type": "github" }, "original": { @@ -268,11 +268,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1763966396, - "narHash": "sha256-r3JipNKafTOQfXuqez57wro7KnwNsqvMFGQ7b48pcfo=", - "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "lastModified": 1764950072, + "narHash": "sha256-lft4/rbh1nFSjHqQatxPEq3n68+iH7QmT5Tqr784e0Q=", + "rev": "f61125a668a320878494449750330ca58b78c557", "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre901419.5ae3b07d8d65/nixexprs.tar.xz?lastModified=1763966396&rev=5ae3b07d8d6527c42f17c876e404993199144b6a" + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre907002.f61125a668a3/nixexprs.tar.xz?lastModified=1764950072&rev=f61125a668a320878494449750330ca58b78c557" }, "original": { "type": "tarball", @@ -301,11 +301,11 @@ ] }, "locked": { - "lastModified": 1764038373, - "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=", + "lastModified": 1765161692, + "narHash": "sha256-XdY9AFzmgRPYIhP4N+WiCHMNxPoifP5/Ld+orMYBD8c=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9", + "rev": "7ed7e8c74be95906275805db68201e74e9904f07", "type": "github" }, "original": { diff --git a/nix/ext/tests/pgrouting.nix b/nix/ext/tests/pgrouting.nix index e50c81950..3fe656977 100644 --- a/nix/ext/tests/pgrouting.nix +++ b/nix/ext/tests/pgrouting.nix @@ -12,16 +12,15 @@ let majorVersion = lib.versions.major postgresql.version; pkg = pkgs.buildEnv { name = "postgresql-${majorVersion}-${pname}"; - paths = - [ - postgresql - postgresql.lib - (installedExtension majorVersion) - (self.legacyPackages.${pkgs.system}."psql_${majorVersion}".exts.postgis) - ] - ++ lib.optional (postgresql.isOrioleDB) ( - self.legacyPackages.${pkgs.system}."psql_orioledb-17".exts.orioledb - ); + paths = [ + postgresql + postgresql.lib + (installedExtension majorVersion) + (self.legacyPackages.${pkgs.system}."psql_${majorVersion}".exts.postgis) + ] + ++ lib.optional (postgresql.isOrioleDB) ( + self.legacyPackages.${pkgs.system}."psql_orioledb-17".exts.orioledb + ); passthru = { inherit (postgresql) version psqlSchema; installedExtensions = [ (installedExtension majorVersion) ]; diff --git a/nix/overlays/default.nix b/nix/overlays/default.nix index 71e8d92d5..a5a18d5c9 100644 --- a/nix/overlays/default.nix +++ b/nix/overlays/default.nix @@ -1,6 +1,6 @@ { self, ... }: { - flake.overlays.default = final: prev: { + flake.overlays.default = final: _prev: { # NOTE: add any needed overlays here. in theory we could # pull them from the overlays/ directory automatically, but we don't # want to have an arbitrary order, since it might matter. being From f975fbe6c97bb00886374ef030119f55cc733325 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:55:50 +0100 Subject: [PATCH 28/52] fix(orioledb): fixed installedExtensions reference to use proper self.packages --- nix/ext/tests/orioledb.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/ext/tests/orioledb.nix b/nix/ext/tests/orioledb.nix index bf1c930cb..cc1b09b98 100644 --- a/nix/ext/tests/orioledb.nix +++ b/nix/ext/tests/orioledb.nix @@ -15,7 +15,7 @@ let ]; passthru = { inherit (postgresql) version psqlSchema; - installedExtensions = [ self.packages.${pkgs.system}."psql_orioledb-17/exts/orioledb" ]; + installedExtensions = [ (self.legacyPackages.${pkgs.system}."psql_orioledb-17".exts.orioledb) ]; lib = pkg; withPackages = _: pkg; withJIT = pkg; From 012db0eef0e95a93cc96ed602d8187665eac54c3 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:56:13 +0100 Subject: [PATCH 29/52] fix(postgresql): remove redundant patch substitutions Removed duplicate substituteInPlace calls that were redundantly applied during previous merge operations. Cleaned up the patch application to avoid duplicate substitutions. --- nix/postgresql/generic.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index a0317be95..fc40ca0e2 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -100,7 +100,8 @@ let inherit hash; }; - hardeningEnable = lib.optionals (!stdenv'.cc.isClang) [ "pie" ]; + # The 'pie' hardening flag has been removed in favor of enabling PIE by default in compilers and should no longer be used. + # hardeningEnable = lib.optionals (!stdenv'.cc.isClang) [ "pie" ]; outputs = [ "out" @@ -204,9 +205,6 @@ let postPatch = '' # Hardcode the path to pgxs so pg_config returns the path in $out substituteInPlace "src/common/config_info.c" --subst-var out - substituteInPlace "src/backend/commands/collationcmds.c" --replace-fail '@locale@' '${ - if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc - }/bin/locale' '' + lib.optionalString jitSupport '' # Force lookup of jit stuff in $out instead of $lib From 49620cc44f383ca1c99e09bdd5a452fe0b0ed8f5 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 02:04:33 +0100 Subject: [PATCH 30/52] fix(pgrx): remove deprecated darwin.apple_sdk.frameworks.Security --- nix/cargo-pgrx/buildPgrxExtension.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nix/cargo-pgrx/buildPgrxExtension.nix b/nix/cargo-pgrx/buildPgrxExtension.nix index 828dd7f02..4808906a2 100644 --- a/nix/cargo-pgrx/buildPgrxExtension.nix +++ b/nix/cargo-pgrx/buildPgrxExtension.nix @@ -32,7 +32,6 @@ pkg-config, rustPlatform, stdenv, - darwin, writeShellScriptBin, defaultBindgenHook, }: @@ -124,9 +123,7 @@ let # so we don't accidentally `(rustPlatform.buildRustPackage argsForBuildRustPackage) // { ... }` because # we forgot parentheses finalArgs = argsForBuildRustPackage // { - buildInputs = - (args.buildInputs or [ ]) - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + buildInputs = (args.buildInputs or [ ]); nativeBuildInputs = (args.nativeBuildInputs or [ ]) From e1c603d47708a5fc9d0c5354f37fbff6b7305771 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:16:15 +0100 Subject: [PATCH 31/52] fix(postgis): remove custom sfcgal package dependency Updated postgis.nix to use nixpkgs sfcgal instead of our custom package, eliminating the need to maintain a separate sfcgal build definition. --- nix/ext/pgrouting.nix | 5 ++ nix/ext/pgrouting/pgrouting-3.4.1-pg17.patch | 39 +++++++++++++++ nix/ext/postgis.nix | 2 +- nix/packages/default.nix | 1 - nix/packages/sfcgal.nix | 52 -------------------- nix/tests/expected/pgrouting.out | 12 ++--- 6 files changed, 51 insertions(+), 60 deletions(-) create mode 100644 nix/ext/pgrouting/pgrouting-3.4.1-pg17.patch delete mode 100644 nix/packages/sfcgal.nix diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting.nix index 5690a4140..b3015786e 100644 --- a/nix/ext/pgrouting.nix +++ b/nix/ext/pgrouting.nix @@ -49,6 +49,10 @@ let inherit hash; }; + patches = lib.optionals (version == "3.4.1" && lib.versionAtLeast postgresql.version "17") [ + ./pgrouting/pgrouting-3.4.1-pg17.patch + ]; + #disable compile time warnings for incompatible pointer types only on macos and pg16 NIX_CFLAGS_COMPILE = lib.optionalString ( stdenv.isDarwin && lib.versionAtLeast postgresql.version "16" @@ -56,6 +60,7 @@ let cmakeFlags = [ "-DPOSTGRESQL_VERSION=${postgresql.version}" + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" ] ++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [ "-DCMAKE_MACOSX_RPATH=ON" diff --git a/nix/ext/pgrouting/pgrouting-3.4.1-pg17.patch b/nix/ext/pgrouting/pgrouting-3.4.1-pg17.patch new file mode 100644 index 000000000..5f86e6c57 --- /dev/null +++ b/nix/ext/pgrouting/pgrouting-3.4.1-pg17.patch @@ -0,0 +1,39 @@ +From ce195442200452ae50b63528647e3837e9f121e0 Mon Sep 17 00:00:00 2001 +From: Yvan Sraka +Date: Thu, 4 Dec 2025 19:33:44 +0100 +Subject: [PATCH] Fix PostgreSQL 17 compatibility in SPI_getvalue calls + +SPI_getvalue already returns a char* in PostgreSQL 17, so wrapping +it in DatumGetCString (which expects a Datum) causes a compilation +error. This patch removes the unnecessary DatumGetCString wrapper +in both get_check_data.c and trsp.c files. +--- + src/common/get_check_data.c | 2 +- + src/trsp/trsp.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/common/get_check_data.c b/src/common/get_check_data.c +index 85ea70d..82a81d1 100644 +--- a/src/common/get_check_data.c ++++ b/src/common/get_check_data.c +@@ -304,5 +304,5 @@ pgr_SPI_getFloat8(HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info) { + */ + char* + pgr_SPI_getText(HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info) { +- return DatumGetCString(SPI_getvalue(*tuple, *tupdesc, info.colNumber)); ++ return SPI_getvalue(*tuple, *tupdesc, info.colNumber); + } +diff --git a/src/trsp/trsp.c b/src/trsp/trsp.c +index 7f9397a..52b68dd 100644 +--- a/src/trsp/trsp.c ++++ b/src/trsp/trsp.c +@@ -114,8 +114,8 @@ fetch_restrict(HeapTuple *tuple, TupleDesc *tupdesc, + if (isnull) + elog(ERROR, "to_cost contains a null value"); + rest->to_cost = DatumGetFloat8(binval); +- char *str = DatumGetCString(SPI_getvalue(*tuple, *tupdesc, +- restrict_columns->via_path)); ++ char *str = SPI_getvalue(*tuple, *tupdesc, ++ restrict_columns->via_path); + + // PGR_DBG("restriction: %f, %i, %s", rest->to_cost, rest->target_id, str); diff --git a/nix/ext/postgis.nix b/nix/ext/postgis.nix index a8dd831a1..3989e8aae 100644 --- a/nix/ext/postgis.nix +++ b/nix/ext/postgis.nix @@ -16,10 +16,10 @@ nixosTests, callPackage, buildEnv, + sfcgal, }: let - sfcgal = callPackage ../packages/sfcgal.nix { }; gdal = callPackage ./gdal.nix { inherit postgresql; }; pname = "postgis"; diff --git a/nix/packages/default.nix b/nix/packages/default.nix index bdc3e14ed..ca7d5fa77 100644 --- a/nix/packages/default.nix +++ b/nix/packages/default.nix @@ -49,7 +49,6 @@ pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP; pg_regress = makePgRegress activeVersion; run-testinfra = pkgs.callPackage ./run-testinfra.nix { }; - sfcgal = pkgs.callPackage ./sfcgal.nix { }; show-commands = pkgs.callPackage ./show-commands.nix { }; start-client = pkgs.callPackage ./start-client.nix { psql_15 = self'.packages."psql_15/bin"; diff --git a/nix/packages/sfcgal.nix b/nix/packages/sfcgal.nix deleted file mode 100644 index da962cbf8..000000000 --- a/nix/packages/sfcgal.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitLab, - cgal, - cmake, - pkg-config, - gmp, - mpfr, - boost, -}: - -stdenv.mkDerivation rec { - pname = "sfcgal"; - version = "61f3b08ade49493b56c6bafa98c7c1f84addbc10"; - - src = fetchFromGitLab { - owner = "sfcgal"; - repo = "SFCGAL"; - rev = "${version}"; - hash = "sha256-nKSqiFyMkZAYptIeShb1zFg9lYSny3kcGJfxdeTFqxw="; - }; - - nativeBuildInputs = [ - cmake - pkg-config - cgal - gmp - mpfr - boost - ]; - - cmakeFlags = [ - "-DCGAL_DIR=${cgal}" - "-DCMAKE_PREFIX_PATH=${cgal}" - ]; - - postPatch = '' - substituteInPlace sfcgal.pc.in \ - --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ - ''; - - meta = with lib; { - description = "A wrapper around CGAL that intents to implement 2D and 3D operations on OGC standards models"; - homepage = "https://sfcgal.gitlab.io/SFCGAL/"; - license = with licenses; [ - gpl3Plus - lgpl3Plus - ]; - platforms = platforms.all; - }; -} diff --git a/nix/tests/expected/pgrouting.out b/nix/tests/expected/pgrouting.out index f74d8e680..2362a72ed 100644 --- a/nix/tests/expected/pgrouting.out +++ b/nix/tests/expected/pgrouting.out @@ -19,12 +19,12 @@ select * from pgr_dijkstra( 1, -- start node 4 -- end node ); - seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost ------+----------+-----------+---------+------+------+------+---------- - 1 | 1 | 1 | 4 | 1 | 1 | 1 | 0 - 2 | 2 | 1 | 4 | 2 | 2 | 1 | 1 - 3 | 3 | 1 | 4 | 3 | 3 | 1 | 2 - 4 | 4 | 1 | 4 | 4 | -1 | 0 | 3 + seq | path_seq | node | edge | cost | agg_cost +-----+----------+------+------+------+---------- + 1 | 1 | 1 | 1 | 1 | 0 + 2 | 2 | 2 | 2 | 1 | 1 + 3 | 3 | 3 | 3 | 1 | 2 + 4 | 4 | 4 | -1 | 0 | 3 (4 rows) drop schema v cascade; From 6328cde286a01ebac4f468031da5f113fa047a5a Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:16:40 +0100 Subject: [PATCH 32/52] fix(pg_net): pin curl to older nixpkgs version pg_net requires an older version of curl (pinned from nixpkgs commit a76c4553d7e741e17f289224eda135423de0491d) to resolve build compatibility issues. --- nix/ext/pg_net.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix index d9f47aab8..38673db40 100644 --- a/nix/ext/pg_net.nix +++ b/nix/ext/pg_net.nix @@ -3,13 +3,19 @@ lib, stdenv, fetchFromGitHub, - curl, postgresql, libuv, makeWrapper, switch-ext-version, }: +let + olderPkgs = import (fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz"; + sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v"; + }) { system = stdenv.system; }; + curl = olderPkgs.curl; +in let pname = "pg_net"; build = From fd94502ce28374518fa0817a5997b6e4132707e9 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:17:09 +0100 Subject: [PATCH 33/52] fix(pgrx): error: multiple input filenames provided Updated cargo-pgrx buildPgrxExtension with rustc wrapper to handle empty postmaster_stub.rs files that cause duplicate symbol errors. (first two filenames are `` and `/build/tmp.*/postmaster_stubs/nix/store/*/bin/postmaster_stub.rs`) pg_jsonschema cargo checks fails on specific versions (0.2.0, 0.3.1, 0.3.3). --- nix/cargo-pgrx/buildPgrxExtension.nix | 61 +++++++++++++++++++-------- nix/cargo-pgrx/versions.json | 53 +++++++++++++---------- nix/ext/pg_jsonschema/default.nix | 8 +++- 3 files changed, 80 insertions(+), 42 deletions(-) diff --git a/nix/cargo-pgrx/buildPgrxExtension.nix b/nix/cargo-pgrx/buildPgrxExtension.nix index 4808906a2..f091e93dd 100644 --- a/nix/cargo-pgrx/buildPgrxExtension.nix +++ b/nix/cargo-pgrx/buildPgrxExtension.nix @@ -28,6 +28,7 @@ # SOFTWARE. { lib, + bash, cargo-pgrx, pkg-config, rustPlatform, @@ -136,24 +137,48 @@ let ++ lib.optionals useFakeRustfmt [ fakeRustfmt ]; buildPhase = '' - runHook preBuild - - echo "Executing cargo-pgrx buildPhase" - ${preBuildAndTest} - ${maybeEnterBuildAndTestSubdir} - - export PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" - export PGX_BUILD_FLAGS="$PGRX_BUILD_FLAGS" - ${lib.optionalString stdenv.hostPlatform.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \ - cargo ${pgrxBinaryName} package \ - --pg-config ${lib.getDev postgresql}/bin/pg_config \ - ${maybeDebugFlag} \ - --features "${builtins.concatStringsSep " " buildFeatures}" \ - --out-dir "$out" - - ${maybeLeaveBuildAndTestSubdir} - - runHook postBuild + runHook preBuild + + echo "Executing cargo-pgrx buildPhase" + ${preBuildAndTest} + ${maybeEnterBuildAndTestSubdir} + + export PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" + export PGX_BUILD_FLAGS="$PGRX_BUILD_FLAGS" + + # Wrap rustc to filter out empty postmaster_stub.rs arguments + original_rustc=$(command -v rustc) + mkdir -p $out/bin + cat > $out/bin/rustc << EOF + #!${bash}/bin/bash + filtered_args=() + for arg in "\$@"; do + if [[ -z "\$arg" ]]; then + continue + fi + if [[ "\$arg" =~ postmaster_stub\.rs$ ]]; then + if [[ ! -s "\$arg" ]]; then + continue + fi + fi + filtered_args+=("\$arg") + done + exec "$original_rustc" "\''${filtered_args[@]}" + EOF + chmod +x $out/bin/rustc + export PATH="$out/bin:$PATH" + export RUSTC="$out/bin/rustc" + + ${lib.optionalString stdenv.hostPlatform.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \ + cargo ${pgrxBinaryName} package \ + --pg-config ${lib.getDev postgresql}/bin/pg_config \ + ${maybeDebugFlag} \ + --features "${builtins.concatStringsSep " " buildFeatures}" \ + --out-dir "$out" + + ${maybeLeaveBuildAndTestSubdir} + + runHook postBuild ''; preCheck = preBuildAndTest + args.preCheck or ""; diff --git a/nix/cargo-pgrx/versions.json b/nix/cargo-pgrx/versions.json index ff95da2da..184dbe9bc 100644 --- a/nix/cargo-pgrx/versions.json +++ b/nix/cargo-pgrx/versions.json @@ -2,16 +2,22 @@ "0.6.1": { "hash": "sha256-O4eHVbJBudybsPab+zr2eXnfheREMqLAHAKm2GDbfrs=", "rust": { + "1.76.0": { + "cargoHash": "sha256-lcnUVO8dJET5g6wM1YgTsj4uP4I3vVZy5PWBKIsvLB8=" + }, "1.82.0": { - "cargoHash": "sha256-MucGrA3qXgJOcT2LMNmoNOhQi8QA3LuqgZEHKycLCCo=" + "cargoHash": "sha256-lcnUVO8dJET5g6wM1YgTsj4uP4I3vVZy5PWBKIsvLB8=" } } }, "0.7.1": { "hash": "sha256-t/gdlrBeP6KFkBFJiZUa8KKVJVYMf6753vQGKJdytss=", "rust": { + "1.76.0": { + "cargoHash": "sha256-bLS/pKJnwgcp38wAHej6vOkzVb/E2UHRCQ/OMDI6GqU=" + }, "1.82.0": { - "cargoHash": "sha256-muce9wT4LAJmfNLWWEShARnpZgglXe/KrfxlitmGgXk=" + "cargoHash": "sha256-bLS/pKJnwgcp38wAHej6vOkzVb/E2UHRCQ/OMDI6GqU=" } } }, @@ -19,7 +25,10 @@ "hash": "sha256-GpXQUOBuojAqPXyRR+k8AVW2XzBbn6V0+2dhP4w4Vs8=", "rust": { "1.70.0": { - "cargoHash": "sha256-YbwGh3tbt8W9/VOu11fTWO9fRMUlrwJnG4wxUHuyX10=" + "cargoHash": "sha256-TGeHOA5kRZ7KclRfYj6V+/ZbPiPx/4xUyKxNm4o7ubM=" + }, + "1.76.0": { + "cargoHash": "sha256-TGeHOA5kRZ7KclRfYj6V+/ZbPiPx/4xUyKxNm4o7ubM=" } } }, @@ -27,7 +36,10 @@ "hash": "sha256-uDBq7tUZ9f8h5nlRFR1mv4+Ty1OFtAk5P7OTNQPI1gI=", "rust": { "1.70.0": { - "cargoHash": "sha256-YTkjqMNF+cz5XtELh7+l8KwvRoVKQP7t98nkJwkW218=" + "cargoHash": "sha256-uc1/zWMLt5U0egsf3xu/5RxouSl0m+81qY+ZZd8BSxU=" + }, + "1.76.0": { + "cargoHash": "sha256-uc1/zWMLt5U0egsf3xu/5RxouSl0m+81qY+ZZd8BSxU=" } } }, @@ -35,10 +47,10 @@ "hash": "sha256-FqjfbJmSy5UCpPPPk4bkEyvQCnaH9zYtkI7txgIn+ls=", "rust": { "1.70.0": { - "cargoHash": "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI=" + "cargoHash": "sha256-VlxXXSwegKGYIO3r3XtclwdtkJNz4r5H35Tkkw0nl9c=" }, "1.76.0": { - "cargoHash": "sha256-syZ3cQq8qDHBLvqmNDGoxeK6zXHJ47Jwkw3uhaXNCzI=" + "cargoHash": "sha256-VlxXXSwegKGYIO3r3XtclwdtkJNz4r5H35Tkkw0nl9c=" } } }, @@ -46,24 +58,24 @@ "hash": "sha256-8NlpMDFaltTIA8G4JioYm8LaPJ2RGKH5o6sd6lBHmmM=", "rust": { "1.70.0": { - "cargoHash": "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI=" - }, - "1.76.0": { - "cargoHash": "sha256-qTb3JV3u42EilaK2jP9oa5D09mkuHyRbGGRs9Rg4TzI=" + "cargoHash": "sha256-TMuJ7kyMckCT4JJVWuEE14HpD5uw3Vjym96GA71vOMo=" }, "1.85.1": { - "cargoHash": "sha256-CbU5B0pvB9ApTZOdYP/ZwuIG8bqGzk/ING2PCM0q2bQ=" + "cargoHash": "sha256-TMuJ7kyMckCT4JJVWuEE14HpD5uw3Vjym96GA71vOMo=" } } }, "0.11.3": { "hash": "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=", "rust": { + "1.70.0": { + "cargoHash": "sha256-giL077I5VzWJ+fAbxqp/Oc28Qjc7ontVm7of5LQz+uY=" + }, "1.76.0": { - "cargoHash": "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw=" + "cargoHash": "sha256-giL077I5VzWJ+fAbxqp/Oc28Qjc7ontVm7of5LQz+uY=" }, "1.85.1": { - "cargoHash": "sha256-KBlT3FARjGcbtHIGDoC6ir3aNXXfDRmIoy990SOqoFg=" + "cargoHash": "sha256-giL077I5VzWJ+fAbxqp/Oc28Qjc7ontVm7of5LQz+uY=" } } }, @@ -71,10 +83,10 @@ "hash": "sha256-7aQkrApALZe6EoQGVShGBj0UIATnfOy2DytFj9IWdEA=", "rust": { "1.80.0": { - "cargoHash": "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w=" + "cargoHash": "sha256-pnMxWWfvr1/AEp8DvG4awig8zjdHizJHoZ5RJA8CL08=" }, "1.81.0": { - "cargoHash": "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w=" + "cargoHash": "sha256-pnMxWWfvr1/AEp8DvG4awig8zjdHizJHoZ5RJA8CL08=" } } }, @@ -82,13 +94,10 @@ "hash": "sha256-aR3DZAjeEEAjLQfZ0ZxkjLqTVMIEbU0UiZ62T4BkQq8=", "rust": { "1.81.0": { - "cargoHash": "sha256-53HKhvsKLTa2JCByLEcK3UzWXoM+LTatd98zvS1C9no=" + "cargoHash": "sha256-yZpD3FriL9UbzRtdFkfIfFfYIrRPYxr/lZ5rb0YBTPc=" }, "1.84.0": { - "cargoHash": "sha256-KTKcol9qSNLQZGW32e6fBb6cPkUGItknyVpLdBYqrBY=" - }, - "1.87.0": { - "cargoHash": "sha256-KTKcol9qSNLQZGW32e6fBb6cPkUGItknyVpLdBYqrBY=" + "cargoHash": "sha256-yZpD3FriL9UbzRtdFkfIfFfYIrRPYxr/lZ5rb0YBTPc=" } } }, @@ -104,7 +113,7 @@ "hash": "sha256-emNR7fXNVD9sY/Mdno7mwpH6l/7AD28cBUsFRn9je50=", "rust": { "1.87.0": { - "cargoHash": "sha256-pK6OxRNubcWhohLvIJIliRtaHSIQOhQp7Q9brPygZYA=" + "cargoHash": "sha256-3eyBDWDoCzSU0tbab8qbjSnBkkN0oOgd7YbuyHLEHYw=" } } }, @@ -112,7 +121,7 @@ "hash": "sha256-AjoBr+/sEPdzbD0wLUNVm2syCySkGaFOFQ70TST1U9w=", "rust": { "1.88.0": { - "cargoHash": "sha256-uWj/V2lJa6HF2GlHX+i5RbSMZFOxZsBzOf6okKDb0j8=" + "cargoHash": "sha256-95DHq5GLnAqb3bbKwwaeBeKEmkfRh81ZTRaJ7L59DAg=" } } } diff --git a/nix/ext/pg_jsonschema/default.nix b/nix/ext/pg_jsonschema/default.nix index 4578517d1..c3e071232 100644 --- a/nix/ext/pg_jsonschema/default.nix +++ b/nix/ext/pg_jsonschema/default.nix @@ -47,7 +47,6 @@ let ]; # update the following array when the pg_jsonschema version is updated # required to ensure that extensions update scripts from previous versions are generated - previousVersions = [ "0.3.1" "0.3.0" @@ -83,7 +82,12 @@ let cargo pgrx init --pg${lib.versions.major postgresql.version} $PGRX_HOME/${lib.versions.major postgresql.version}/bin/pg_config ''; - doCheck = true; + doCheck = + !(builtins.elem version [ + "0.2.0" + "0.3.1" + "0.3.3" + ]); preBuild = '' echo "Processing git tags..." From 94ade255e576b330df5b66d7efcccb63e1646ab5 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:56:38 +0100 Subject: [PATCH 34/52] fix(tests): updated test expectations Remove deprecated functions that were removed in newer pgrouting versions (_pgr_betweennesscentrality and _pgr_contractionhierarchies). --- nix/tests/expected/z_15_ext_interface.out | 91 ++++++------------- nix/tests/expected/z_17_ext_interface.out | 89 ++++++------------ .../expected/z_orioledb-17_ext_interface.out | 89 ++++++------------ 3 files changed, 85 insertions(+), 184 deletions(-) diff --git a/nix/tests/expected/z_15_ext_interface.out b/nix/tests/expected/z_15_ext_interface.out index 88c72dfe1..c68d84210 100644 --- a/nix/tests/expected/z_15_ext_interface.out +++ b/nix/tests/expected/z_15_ext_interface.out @@ -14,7 +14,7 @@ added and you should `create extension ...` to enable it in ./nix/tests/prime */ create extension if not exists adminpack; create extension if not exists plv8 with version '3.1.10'; -create extension if not exists plcoffee;ß +create extension if not exists plcoffee; create extension if not exists plls; create extension if not exists old_snapshot; create extension if not exists timescaledb; @@ -1622,7 +1622,6 @@ order by pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_betweennesscentrality | edges_sql text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1639,7 +1638,6 @@ order by pgrouting | public | _pgr_compiler_version | | text pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | _pgr_contractionhierarchies | edges_sql text, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1655,7 +1653,6 @@ order by pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_drivingdistancev4 | text, anyarray, double precision, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1677,9 +1674,6 @@ order by pgrouting | public | _pgr_isplanar | text | boolean pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_kruskalv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_ksp | text, anyarray, anyarray, integer, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_ksp | text, text, integer, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record pgrouting | public | _pgr_lib_version | | text @@ -1700,7 +1694,6 @@ order by pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_primv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_quote_ident | idname text | text pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_startpoint | g geometry | geometry @@ -1715,8 +1708,6 @@ order by pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_trspv4 | text, text, text, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_trspv4 | text, text, anyarray, anyarray, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record @@ -1728,9 +1719,6 @@ order by pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsddv4 | text, text, anyarray, double precision, character, boolean, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, boolean, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsksp | text, text, text, integer, character, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record @@ -1741,10 +1729,10 @@ order by pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint - pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1752,10 +1740,10 @@ order by pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1779,7 +1767,6 @@ order by pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_betweennesscentrality | text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1799,10 +1786,6 @@ order by pgrouting | public | pgr_chinesepostmancost | text | double precision pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contraction | text, directed boolean, methods integer[], cycles integer, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contractiondeadend | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contractionhierarchies | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record - pgrouting | public | pgr_contractionlinear | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1811,13 +1794,12 @@ order by pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_degree | text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1835,8 +1817,8 @@ order by pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1856,27 +1838,21 @@ order by pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record - pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record - pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_isplanar | text | boolean pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, anyarray, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, text, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, anyarray, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record @@ -1902,21 +1878,19 @@ order by pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record - pgrouting | public | pgr_separatecrossing | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record - pgrouting | public | pgr_separatetouching | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record @@ -1954,16 +1928,9 @@ order by pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, character, directed boolean, details boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, character, directed boolean, details boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, bigint, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, text, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, anyarray, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key diff --git a/nix/tests/expected/z_17_ext_interface.out b/nix/tests/expected/z_17_ext_interface.out index 36401b508..1b09ed17e 100644 --- a/nix/tests/expected/z_17_ext_interface.out +++ b/nix/tests/expected/z_17_ext_interface.out @@ -1607,7 +1607,6 @@ order by pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_betweennesscentrality | edges_sql text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1624,7 +1623,6 @@ order by pgrouting | public | _pgr_compiler_version | | text pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | _pgr_contractionhierarchies | edges_sql text, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1640,7 +1638,6 @@ order by pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_drivingdistancev4 | text, anyarray, double precision, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1662,9 +1659,6 @@ order by pgrouting | public | _pgr_isplanar | text | boolean pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_kruskalv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_ksp | text, anyarray, anyarray, integer, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_ksp | text, text, integer, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record pgrouting | public | _pgr_lib_version | | text @@ -1685,7 +1679,6 @@ order by pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_primv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_quote_ident | idname text | text pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_startpoint | g geometry | geometry @@ -1700,8 +1693,6 @@ order by pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_trspv4 | text, text, text, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_trspv4 | text, text, anyarray, anyarray, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record @@ -1713,9 +1704,6 @@ order by pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsddv4 | text, text, anyarray, double precision, character, boolean, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, boolean, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsksp | text, text, text, integer, character, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record @@ -1726,10 +1714,10 @@ order by pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint - pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1737,10 +1725,10 @@ order by pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1764,7 +1752,6 @@ order by pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_betweennesscentrality | text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1784,10 +1771,6 @@ order by pgrouting | public | pgr_chinesepostmancost | text | double precision pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contraction | text, directed boolean, methods integer[], cycles integer, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contractiondeadend | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contractionhierarchies | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record - pgrouting | public | pgr_contractionlinear | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1796,13 +1779,12 @@ order by pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_degree | text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1820,8 +1802,8 @@ order by pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1841,27 +1823,21 @@ order by pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record - pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record - pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_isplanar | text | boolean pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, anyarray, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, text, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, anyarray, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record @@ -1887,21 +1863,19 @@ order by pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record - pgrouting | public | pgr_separatecrossing | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record - pgrouting | public | pgr_separatetouching | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record @@ -1939,16 +1913,9 @@ order by pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, character, directed boolean, details boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, character, directed boolean, details boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, bigint, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, text, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, anyarray, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key diff --git a/nix/tests/expected/z_orioledb-17_ext_interface.out b/nix/tests/expected/z_orioledb-17_ext_interface.out index 36401b508..1b09ed17e 100644 --- a/nix/tests/expected/z_orioledb-17_ext_interface.out +++ b/nix/tests/expected/z_orioledb-17_ext_interface.out @@ -1607,7 +1607,6 @@ order by pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_betweennesscentrality | edges_sql text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1624,7 +1623,6 @@ order by pgrouting | public | _pgr_compiler_version | | text pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | _pgr_contractionhierarchies | edges_sql text, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1640,7 +1638,6 @@ order by pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_drivingdistancev4 | text, anyarray, double precision, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1662,9 +1659,6 @@ order by pgrouting | public | _pgr_isplanar | text | boolean pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_kruskalv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_ksp | text, anyarray, anyarray, integer, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_ksp | text, text, integer, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record pgrouting | public | _pgr_lib_version | | text @@ -1685,7 +1679,6 @@ order by pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_primv4 | text, anyarray, text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_quote_ident | idname text | text pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | _pgr_startpoint | g geometry | geometry @@ -1700,8 +1693,6 @@ order by pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_trspv4 | text, text, text, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_trspv4 | text, text, anyarray, anyarray, boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record @@ -1713,9 +1704,6 @@ order by pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsddv4 | text, text, anyarray, double precision, character, boolean, boolean, boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, boolean, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | _pgr_withpointsksp | text, text, text, integer, character, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record @@ -1726,10 +1714,10 @@ order by pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint - pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1737,10 +1725,10 @@ order by pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1764,7 +1752,6 @@ order by pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_betweennesscentrality | text, directed boolean, OUT vid bigint, OUT centrality double precision | SETOF record pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1784,10 +1771,6 @@ order by pgrouting | public | pgr_chinesepostmancost | text | double precision pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contraction | text, directed boolean, methods integer[], cycles integer, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contractiondeadend | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_contractionhierarchies | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision, OUT metric bigint, OUT vertex_order bigint | SETOF record - pgrouting | public | pgr_contractionlinear | text, directed boolean, forbidden bigint[], OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record @@ -1796,13 +1779,12 @@ order by pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_degree | text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record @@ -1820,8 +1802,8 @@ order by pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record @@ -1841,27 +1823,21 @@ order by pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record - pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record - pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_isplanar | text | boolean pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, anyarray, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, text, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, anyarray, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, anyarray, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record @@ -1887,21 +1863,19 @@ order by pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record - pgrouting | public | pgr_separatecrossing | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record - pgrouting | public | pgr_separatetouching | text, tolerance double precision, dryrun boolean, OUT seq integer, OUT id bigint, OUT sub_id integer, OUT geom geometry | SETOF record pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record @@ -1939,16 +1913,9 @@ order by pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, character, directed boolean, details boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, character, directed boolean, details boolean, equicost boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT pred bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, bigint, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, anyarray, anyarray, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, text, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record - pgrouting | public | pgr_withpointsksp | text, text, anyarray, bigint, integer, character, directed boolean, heap_paths boolean, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key From 1b6e80c737af9eba33f0e2b5a957ed482336ae24 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 01:59:50 +0100 Subject: [PATCH 35/52] feat: (re)add check_pg_regress method to PostgresExtensionTest --- nix/ext/tests/lib.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/nix/ext/tests/lib.py b/nix/ext/tests/lib.py index 46db7d241..0e0c10f47 100644 --- a/nix/ext/tests/lib.py +++ b/nix/ext/tests/lib.py @@ -184,3 +184,34 @@ def check_switch_extension_with_background_worker( assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), ( f"Expected {self.extension_name} version {last_version}, but found {ext_version}" ) + + def check_pg_regress(self, pg_regress: Path, pg_version: str, test_name: str): + """Run pg_regress tests for the extension on a given PostgreSQL version. + + Args: + pg_regress: Path to the pg_regress binary + pg_version: PostgreSQL version to test (e.g., "14", "15") + test_name: SQL test file to run with pg_regress + """ + sql_file = self.sql_test_dir / "sql" / f"{test_name}.sql" + if not sql_file.exists(): + # check if we have a postgres version specific sql file + test_name = f"z_{pg_version}_{test_name}" + sql_file = self.sql_test_dir / "sql" / f"{test_name}.sql" + if not sql_file.exists(): + print(f"Skipping pg_regress test for {pg_version}, no sql file found") + return + try: + print( + self.vm.succeed( + f"""sudo -u postgres {pg_regress} --inputdir={self.sql_test_dir} --debug --use-existing --dbname=postgres --outputdir=/tmp/regression_output_{pg_version} "{test_name}" """ + ) + ) + except: + print("Error running pg_regress, diff:") + print( + self.vm.succeed( + f"cat /tmp/regression_output_{pg_version}/regression.diffs" + ) + ) + raise From 446e4412b6a22f10ac26c5f8e7e5fa0a202a1bb0 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 11:03:09 +0100 Subject: [PATCH 36/52] refactor: replace fetchTarball with flake input for nixpkgs-oldstable Improves reproducibility and avoids evaluation-time network access by using a proper flake input instead of fetchTarball for the older nixpkgs needed by pg_net and plv8. --- flake.lock | 17 +++++++++++++++++ flake.nix | 1 + nix/ext/pg_net.nix | 7 ++----- nix/ext/plv8.nix | 7 ++----- nix/ext/plv8/default.nix | 7 ++----- nix/nixpkgs.nix | 6 ++++++ 6 files changed, 30 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 9b458ab1e..3d7f987d6 100644 --- a/flake.lock +++ b/flake.lock @@ -266,6 +266,22 @@ "type": "github" } }, + "nixpkgs-oldstable": { + "locked": { + "lastModified": 1712666087, + "narHash": "sha256-WwjUkWsjlU8iUImbivlYxNyMB1L5YVqE8QotQdL9jWc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a76c4553d7e741e17f289224eda135423de0491d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a76c4553d7e741e17f289224eda135423de0491d", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1764950072, @@ -290,6 +306,7 @@ "nix2container": "nix2container", "nixpkgs": "nixpkgs_2", "nixpkgs-go124": "nixpkgs-go124", + "nixpkgs-oldstable": "nixpkgs-oldstable", "rust-overlay": "rust-overlay", "treefmt-nix": "treefmt-nix_2" } diff --git a/flake.nix b/flake.nix index 978c8b383..a64077ef2 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ nix2container.inputs.nixpkgs.follows = "nixpkgs"; nix2container.url = "github:nlewo/nix2container"; nixpkgs-go124.url = "github:Nixos/nixpkgs/d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0"; + nixpkgs-oldstable.url = "github:NixOS/nixpkgs/a76c4553d7e741e17f289224eda135423de0491d"; nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; rust-overlay.url = "github:oxalica/rust-overlay"; diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix index 38673db40..268b42b7b 100644 --- a/nix/ext/pg_net.nix +++ b/nix/ext/pg_net.nix @@ -7,14 +7,11 @@ libuv, makeWrapper, switch-ext-version, + nixpkgs-oldstable, }: let - olderPkgs = import (fetchTarball { - url = "https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz"; - sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v"; - }) { system = stdenv.system; }; - curl = olderPkgs.curl; + curl = nixpkgs-oldstable.curl; in let pname = "pg_net"; diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix index fd7252ba4..290b3cd8b 100644 --- a/nix/ext/plv8.nix +++ b/nix/ext/plv8.nix @@ -10,14 +10,11 @@ clang, xcbuild, patchelf, + nixpkgs-oldstable, }: let # plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8) - node_pkgs = import (fetchTarball { - url = "https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz"; - sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v"; - }) { system = stdenv.system; }; - inherit (node_pkgs) v8; + inherit (nixpkgs-oldstable) v8; in stdenv.mkDerivation (finalAttrs: { pname = "plv8"; diff --git a/nix/ext/plv8/default.nix b/nix/ext/plv8/default.nix index 71f1dcf22..eddfed788 100644 --- a/nix/ext/plv8/default.nix +++ b/nix/ext/plv8/default.nix @@ -14,6 +14,7 @@ buildEnv, nodejs_20, libcxx, + nixpkgs-oldstable, }: let @@ -36,11 +37,7 @@ let ); # plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8) - node_pkgs = import (fetchTarball { - url = "https://github.com/nixos/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz"; - sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v"; - }) { system = stdenv.system; }; - inherit (node_pkgs) v8; + inherit (nixpkgs-oldstable) v8; # Build function for individual versions build = diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix index 005dd80aa..7c969d5b0 100644 --- a/nix/nixpkgs.nix +++ b/nix/nixpkgs.nix @@ -10,6 +10,12 @@ overlays = [ (import inputs.rust-overlay) self.overlays.default + (_final: _prev: { + nixpkgs-oldstable = import inputs.nixpkgs-oldstable { + inherit system; + config.allowUnfree = true; + }; + }) ]; }; }; From c935ced15a592494b566aaaff504fae82e63c938 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 11:20:52 +0100 Subject: [PATCH 37/52] fix(pg_net): disable dangling-assignment warning for v0.19.5 on aarch64-darwin Version 0.19.5 has a dangling pointer issue in src/core.c:177 that causes compilation to fail on aarch64-darwin with newer clang versions. This adds -Wno-error=dangling-assignment to allow compilation to proceed. The flag is restricted to aarch64-darwin only since GCC on Linux doesn't recognize this warning option. --- nix/ext/pg_net.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix index 268b42b7b..6e0f00782 100644 --- a/nix/ext/pg_net.nix +++ b/nix/ext/pg_net.nix @@ -49,7 +49,14 @@ let rm sql/pg_net--0.5.1--0.6.sql ''; - env.NIX_CFLAGS_COMPILE = lib.optionalString (lib.versionOlder version "0.19.1") "-Wno-error"; + env.NIX_CFLAGS_COMPILE = + if (lib.versionOlder version "0.19.1") then + "-Wno-error" + else if (version == "0.19.5" && stdenv.isDarwin && stdenv.isAarch64) then + # Fix for dangling pointer warning in src/core.c:177 on aarch64-darwin with newer clang + "-Wno-error=dangling-assignment" + else + ""; installPhase = '' mkdir -p $out/{lib,share/postgresql/extension} From 3d4fb691bce26c32afe5e44c62dd5c3cb93d78dc Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 11:34:52 +0100 Subject: [PATCH 38/52] fix(plv8): add headerpad_max_install_names for macOS builds Add -headerpad_max_install_names linker flag to prevent 'install_name_tool: changing install names or rpaths can't be redone' errors on macOS. This allocates sufficient header space for install_name_tool to modify the shared library during post-install processing. --- nix/ext/plv8.nix | 3 ++- nix/ext/plv8/default.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix index 290b3cd8b..f3b38ca52 100644 --- a/nix/ext/plv8.nix +++ b/nix/ext/plv8.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals stdenv.isDarwin [ "CC=${clang}/bin/clang" "CXX=${clang}/bin/clang++" - "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib -Wl,-headerpad_max_install_names" ] ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; @@ -76,6 +76,7 @@ stdenv.mkDerivation (finalAttrs: { "-undefined" "dynamic_lookup" "-flat_namespace" + "-headerpad_max_install_names" ] ); diff --git a/nix/ext/plv8/default.nix b/nix/ext/plv8/default.nix index eddfed788..7c4119bd6 100644 --- a/nix/ext/plv8/default.nix +++ b/nix/ext/plv8/default.nix @@ -89,7 +89,7 @@ let ++ lib.optionals stdenv.isDarwin [ "CC=${clang}/bin/clang" "CXX=${clang}/bin/clang++" - "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib -Wl,-headerpad_max_install_names" ] ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; @@ -107,6 +107,7 @@ let "-undefined" "dynamic_lookup" "-flat_namespace" + "-headerpad_max_install_names" ]; # No configure script. From 22908a2c98862fce46d7cc4a285b1b1e18eb5c4a Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 11:55:32 +0100 Subject: [PATCH 39/52] fix(tests): correct library naming and symlinks for background worker extensions Test assertions were inconsistent: expecting {version}.so and {extension_name}-{version}.so patterns while actual libraries use {lib_name}-{version}.so (e.g. pg_partman_bgw-5.3.1.so, timescaledb-loader-2.16.1.so). Updated PostgresExtensionTest to accept Optional[str] lib_name parameter and use consistent {lib_name}-{version}.so assertions throughout. Added missing timescaledb-loader.so symlink creation and updated the switch script to maintain both symlinks when switching versions. Fixes 'Expected timescaledb version 2.16.1, but found timescaledb-loader-2.16.1.so' and 'Expected pg_partman version 5.3.1, but found pg_partman_bgw-5.3.1.so' test failures. --- nix/ext/tests/default.nix | 2 +- nix/ext/tests/lib.py | 11 +++++++---- nix/ext/tests/timescaledb.nix | 4 ++-- nix/ext/timescaledb.nix | 5 +++++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/nix/ext/tests/default.nix b/nix/ext/tests/default.nix index 07cd9e7d9..fe6aa0276 100644 --- a/nix/ext/tests/default.nix +++ b/nix/ext/tests/default.nix @@ -168,7 +168,7 @@ let server.wait_for_unit("multi-user.target") server.wait_for_unit("postgresql.service") - test = PostgresExtensionTest(server, extension_name, versions, sql_test_directory, support_upgrade, ext_schema) + test = PostgresExtensionTest(server, extension_name, versions, sql_test_directory, support_upgrade, ext_schema, lib_name) test.create_schema() with subtest("Check upgrade path with postgresql 15"): diff --git a/nix/ext/tests/lib.py b/nix/ext/tests/lib.py index 0e0c10f47..26bd42d49 100644 --- a/nix/ext/tests/lib.py +++ b/nix/ext/tests/lib.py @@ -5,7 +5,7 @@ installation, upgrades, and version verification of PostgreSQL extensions. """ -from typing import Sequence, Mapping +from typing import Sequence, Mapping, Optional from pathlib import Path from test_driver.machine import Machine @@ -21,6 +21,7 @@ def __init__( sql_test_dir: Path, support_upgrade: bool = True, schema: str = "public", + lib_name: Optional[str] = None, ): """Initialize the PostgreSQL extension test framework. @@ -30,6 +31,7 @@ def __init__( versions: Mapping of PostgreSQL versions to available extension versions sql_test_dir: Directory containing SQL test files for pg_regress support_upgrade: Whether the extension supports in-place upgrades + lib_name: Name of the shared library (defaults to extension_name) """ self.vm = vm self.extension_name = extension_name @@ -37,6 +39,7 @@ def __init__( self.support_upgrade = support_upgrade self.sql_test_dir = sql_test_dir self.schema = schema + self.lib_name = lib_name or extension_name def create_schema(self): self.run_sql(f"CREATE SCHEMA IF NOT EXISTS {self.schema};") @@ -163,7 +166,7 @@ def check_switch_extension_with_background_worker( f"No versions available for PostgreSQL version {pg_version}" ) last_version = available_versions[-1] - assert ext_version.endswith(f"{last_version}.so"), ( + assert ext_version.endswith(f"{self.lib_name}-{last_version}.so"), ( f"Expected {self.extension_name} version {last_version}, but found {ext_version}" ) @@ -173,7 +176,7 @@ def check_switch_extension_with_background_worker( # Check that we are using the first version now ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip() - assert ext_version.endswith(f"{first_version}.so"), ( + assert ext_version.endswith(f"{self.lib_name}-{first_version}.so"), ( f"Expected {self.extension_name} version {first_version}, but found {ext_version}" ) @@ -181,7 +184,7 @@ def check_switch_extension_with_background_worker( self.vm.succeed(f"switch_{self.extension_name}_version {last_version}") # Check that we are using the last version now ext_version = self.vm.succeed(f"readlink -f {extension_lib_path}").strip() - assert ext_version.endswith(f"{self.extension_name}-{last_version}.so"), ( + assert ext_version.endswith(f"{self.lib_name}-{last_version}.so"), ( f"Expected {self.extension_name} version {last_version}, but found {ext_version}" ) diff --git a/nix/ext/tests/timescaledb.nix b/nix/ext/tests/timescaledb.nix index 56e3a6dbf..16a286f15 100644 --- a/nix/ext/tests/timescaledb.nix +++ b/nix/ext/tests/timescaledb.nix @@ -88,12 +88,12 @@ self.inputs.nixpkgs.lib.nixos.runTest { support_upgrade = True sql_test_directory = Path("${../../tests}") - test = PostgresExtensionTest(server, extension_name, versions, sql_test_directory, support_upgrade) + test = PostgresExtensionTest(server, extension_name, versions, sql_test_directory, support_upgrade, "public", "timescaledb-loader") with subtest("Check upgrade path with postgresql 15"): test.check_upgrade_path("15") with subtest("Test switch_${pname}_version"): - test.check_switch_extension_with_background_worker(Path("${psql_15}/lib/${pname}.so"), "15") + test.check_switch_extension_with_background_worker(Path("${psql_15}/lib/timescaledb-loader.so"), "15") ''; } diff --git a/nix/ext/timescaledb.nix b/nix/ext/timescaledb.nix index 8c42aaaef..765ca5267 100644 --- a/nix/ext/timescaledb.nix +++ b/nix/ext/timescaledb.nix @@ -108,6 +108,7 @@ let EXT_LOADER_TO_USE="$EXT_WRAPPER_LIB/$EXT_NAME-loader-$VERSION${postgresql.dlSuffix}" if [ -f "$EXT_LOADER_TO_USE" ]; then ln -sfnv "$EXT_LOADER_TO_USE" "$EXT_WRAPPER_LIB/$EXT_NAME${postgresql.dlSuffix}" + ln -sfnv "$EXT_LOADER_TO_USE" "$EXT_WRAPPER_LIB/$EXT_NAME-loader${postgresql.dlSuffix}" fi ''; }; @@ -125,6 +126,9 @@ buildEnv { # Create symlink from the latest versioned loader to timescaledb.so ln -sfn ${pname}-loader-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix} + # Create symlink for timescaledb-loader.so (used by background worker tests) + ln -sfn ${pname}-loader-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}-loader${postgresql.dlSuffix} + # The versioned extension libraries (timescaledb-VERSION.so) are already in place # checks - we should have loader files and versioned extension files @@ -143,6 +147,7 @@ buildEnv { passthru = { inherit versions numberOfVersions switch-ext-version; hasBackgroundWorker = true; + libName = "timescaledb-loader"; defaultSettings = { shared_preload_libraries = [ "timescaledb" ]; }; From f55b3f10060a8d944a9f8482be2d107cf079452b Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 18:17:00 +0100 Subject: [PATCH 40/52] refactor(exts): replace nixpkgs-oldstable with specific overlay packages Use overlay instead of passing full nixpkgs-oldstable to avoid exposing entire old nixpkgs attribute set. Now provides specific packages (curl_8_4, v8_oldstable) through overlay. --- nix/ext/pg_jsonschema/default.nix | 5 +++++ nix/ext/pg_net.nix | 4 ++-- nix/ext/plv8/default.nix | 5 ++--- nix/nixpkgs.nix | 13 ++++++++++++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/nix/ext/pg_jsonschema/default.nix b/nix/ext/pg_jsonschema/default.nix index c3e071232..426c53dea 100644 --- a/nix/ext/pg_jsonschema/default.nix +++ b/nix/ext/pg_jsonschema/default.nix @@ -82,6 +82,11 @@ let cargo pgrx init --pg${lib.versions.major postgresql.version} $PGRX_HOME/${lib.versions.major postgresql.version}/bin/pg_config ''; + # Tests are disabled for specific versions because pgrx tests require + # `cargo pgrx install --test` which fails in the nix sandbox due to + # write permission restrictions. Unlike pg_graphql which has a custom + # installcheck script, pg_jsonschema only has pgrx cargo tests. + # See: https://github.com/supabase/pg_jsonschema/blob/v0.3.3/src/lib.rs#L45-L195 doCheck = !(builtins.elem version [ "0.2.0" diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix index 6e0f00782..60304138d 100644 --- a/nix/ext/pg_net.nix +++ b/nix/ext/pg_net.nix @@ -7,11 +7,11 @@ libuv, makeWrapper, switch-ext-version, - nixpkgs-oldstable, + curl_8_6, }: let - curl = nixpkgs-oldstable.curl; + curl = curl_8_6; in let pname = "pg_net"; diff --git a/nix/ext/plv8/default.nix b/nix/ext/plv8/default.nix index 7c4119bd6..50927521b 100644 --- a/nix/ext/plv8/default.nix +++ b/nix/ext/plv8/default.nix @@ -2,7 +2,6 @@ stdenv, lib, fetchFromGitHub, - # v8, perl, postgresql, # For passthru test on various systems, and local development on macos @@ -14,7 +13,7 @@ buildEnv, nodejs_20, libcxx, - nixpkgs-oldstable, + v8_oldstable, }: let @@ -37,7 +36,7 @@ let ); # plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8) - inherit (nixpkgs-oldstable) v8; + v8 = v8_oldstable; # Build function for individual versions build = diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix index 7c969d5b0..dbe20cef0 100644 --- a/nix/nixpkgs.nix +++ b/nix/nixpkgs.nix @@ -11,10 +11,21 @@ (import inputs.rust-overlay) self.overlays.default (_final: _prev: { - nixpkgs-oldstable = import inputs.nixpkgs-oldstable { + # Provide older versions of packages required by some extensions + oldstable = import inputs.nixpkgs-oldstable { inherit system; config.allowUnfree = true; }; + curl_8_6 = + (import inputs.nixpkgs-oldstable { + inherit system; + config.allowUnfree = true; + }).curl; + v8_oldstable = + (import inputs.nixpkgs-oldstable { + inherit system; + config.allowUnfree = true; + }).v8; }) ]; }; From 6860c96a042628fb7f54f4c5479851a9813ef32d Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 18:17:07 +0100 Subject: [PATCH 41/52] fix: restore revision support for orioledb builds (introduced it #1880) Keep revision support that was accidentally simplified during nixpkgs update. Restores conditional logic to support building orioledb from specific git revision hashes instead of only tags. --- nix/postgresql/generic.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index fc40ca0e2..95034e060 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -89,11 +89,17 @@ let pname = pname + lib.optionalString jitSupport "-jit"; src = - if (isOrioleDB) then - fetchurl { - url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz"; - inherit hash; - } + if isOrioleDB then + if revision != null then + fetchurl { + url = "https://github.com/orioledb/postgres/archive/${revision}.tar.gz"; + inherit hash; + } + else + fetchurl { + url = "https://github.com/orioledb/postgres/archive/refs/tags/patches${version}.tar.gz"; + inherit hash; + } else fetchurl { url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2"; From 654a9e138468ff50b259956e1788aa81bdc75e83 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 18:17:15 +0100 Subject: [PATCH 42/52] fix(exts): remove old files that were moved to subdirectories These files were moved to subdirectories and the old .nix files should be removed since they were moved to new directory structure with default.nix files. --- nix/ext/pgroonga.nix | 96 --------------------------- nix/ext/plv8.nix | 152 ------------------------------------------- 2 files changed, 248 deletions(-) delete mode 100644 nix/ext/pgroonga.nix delete mode 100644 nix/ext/plv8.nix diff --git a/nix/ext/pgroonga.nix b/nix/ext/pgroonga.nix deleted file mode 100644 index 5d73d9ef8..000000000 --- a/nix/ext/pgroonga.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - pkg-config, - postgresql, - msgpack-c, - mecab, - makeWrapper, - xxHash, - supabase-groonga, -}: -stdenv.mkDerivation rec { - pname = "pgroonga"; - version = "3.2.5"; - src = fetchurl { - url = "https://packages.groonga.org/source/${pname}/${pname}-${version}.tar.gz"; - sha256 = "sha256-GM9EOQty72hdE4Ecq8jpDudhZLiH3pP9ODLxs8DXcSY="; - }; - - nativeBuildInputs = [ - pkg-config - makeWrapper - ]; - - buildInputs = [ - postgresql - msgpack-c - supabase-groonga - mecab - ] - ++ lib.optionals stdenv.isDarwin [ xxHash ]; - - propagatedBuildInputs = [ supabase-groonga ]; - configureFlags = [ - "--with-mecab=${mecab}" - "--enable-mecab" - "--with-groonga=${supabase-groonga}" - "--with-groonga-plugin-dir=${supabase-groonga}/lib/groonga/plugins" - ]; - - makeFlags = [ - "HAVE_MSGPACK=1" - "MSGPACK_PACKAGE_NAME=msgpack-c" - "HAVE_MECAB=1" - ]; - - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin ( - builtins.concatStringsSep " " [ - "-Wno-error=incompatible-function-pointer-types" - "-Wno-error=format" - "-Wno-format" - "-I${supabase-groonga}/include/groonga" - "-I${xxHash}/include" - "-DPGRN_VERSION=\"${version}\"" - ] - ); - - preConfigure = '' - export GROONGA_LIBS="-L${supabase-groonga}/lib -lgroonga" - export GROONGA_CFLAGS="-I${supabase-groonga}/include" - export MECAB_CONFIG="${mecab}/bin/mecab-config" - ${lib.optionalString stdenv.isDarwin '' - export CPPFLAGS="-I${supabase-groonga}/include/groonga -I${xxHash}/include -DPGRN_VERSION=\"${version}\"" - export CFLAGS="-I${supabase-groonga}/include/groonga -I${xxHash}/include -DPGRN_VERSION=\"${version}\"" - export PG_CPPFLAGS="-Wno-error=incompatible-function-pointer-types -Wno-error=format" - ''} - ''; - - installPhase = '' - mkdir -p $out/lib $out/share/postgresql/extension $out/bin - install -D pgroonga${postgresql.dlSuffix} -t $out/lib/ - install -D pgroonga.control -t $out/share/postgresql/extension - install -D data/pgroonga-*.sql -t $out/share/postgresql/extension - install -D pgroonga_database${postgresql.dlSuffix} -t $out/lib/ - install -D pgroonga_database.control -t $out/share/postgresql/extension - install -D data/pgroonga_database-*.sql -t $out/share/postgresql/extension - - echo "Debug: Groonga plugins directory contents:" - ls -l ${supabase-groonga}/lib/groonga/plugins/tokenizers/ - ''; - - meta = with lib; { - description = "A PostgreSQL extension to use Groonga as the index"; - longDescription = '' - PGroonga is a PostgreSQL extension to use Groonga as the index. - PostgreSQL supports full text search against languages that use only alphabet and digit. - It means that PostgreSQL doesn't support full text search against Japanese, Chinese and so on. - You can use super fast full text search feature against all languages by installing PGroonga into your PostgreSQL. - ''; - homepage = "https://pgroonga.github.io/"; - changelog = "https://github.com/pgroonga/pgroonga/releases/tag/${version}"; - license = licenses.postgresql; - platforms = postgresql.meta.platforms; - }; -} diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix deleted file mode 100644 index f3b38ca52..000000000 --- a/nix/ext/plv8.nix +++ /dev/null @@ -1,152 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, - perl, - postgresql, - # For passthru test on various systems, and local development on macos - # not we are not currently using passthru tests but retaining for possible contrib - # to nixpkgs - clang, - xcbuild, - patchelf, - nixpkgs-oldstable, -}: -let - # plv8 3.1 requires an older version of v8 (we cannot use nodejs.libv8) - inherit (nixpkgs-oldstable) v8; -in -stdenv.mkDerivation (finalAttrs: { - pname = "plv8"; - version = "3.1.10"; - - src = fetchFromGitHub { - owner = "plv8"; - repo = "plv8"; - rev = "v${finalAttrs.version}"; - hash = "sha256-g1A/XPC0dX2360Gzvmo9/FSQnM6Wt2K4eR0pH0p9fz4="; - }; - - patches = [ - # Allow building with system v8. - # https://github.com/plv8/plv8/pull/505 (rejected) - ./0001-build-Allow-using-V8-from-system.patch - ]; - - nativeBuildInputs = [ - perl - ] - ++ lib.optionals stdenv.isDarwin [ - clang - xcbuild - ]; - - buildInputs = [ - v8 - postgresql - ]; - - buildFlags = [ "all" ]; - - makeFlags = [ - # Nixpkgs build a v8 monolith instead of separate v8_libplatform. - "USE_SYSTEM_V8=1" - "V8_OUTDIR=${v8}/lib" - "PG_CONFIG=${postgresql}/bin/pg_config" - ] - ++ lib.optionals stdenv.isDarwin [ - "CC=${clang}/bin/clang" - "CXX=${clang}/bin/clang++" - "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib -Wl,-headerpad_max_install_names" - ] - ++ lib.optionals (!stdenv.isDarwin) [ "SHLIB_LINK=-lv8" ]; - - NIX_LDFLAGS = ( - lib.optionals stdenv.isDarwin [ - "-L${postgresql}/lib" - "-L${v8}/lib" - "-lv8_monolith" - "-lpq" - "-lpgcommon" - "-lpgport" - "-framework" - "CoreFoundation" - "-framework" - "Kerberos" - "-undefined" - "dynamic_lookup" - "-flat_namespace" - "-headerpad_max_install_names" - ] - ); - - installFlags = [ - # PGXS only supports installing to postgresql prefix so we need to redirect this - "DESTDIR=${placeholder "out"}" - ]; - - # No configure script. - dontConfigure = true; - - postPatch = '' - patchShebangs ./generate_upgrade.sh - substituteInPlace generate_upgrade.sh \ - --replace " 2.3.10 " " 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.15 " - - ${lib.optionalString stdenv.isDarwin '' - # Replace g++ with clang++ in Makefile - sed -i 's/g++/clang++/g' Makefile - ''} - ''; - - postInstall = '' - # Move the redirected to proper directory. - # There appear to be no references to the install directories - # so changing them does not cause issues. - mv "$out/nix/store"/*/* "$out" - rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix" - - # Handle different PostgreSQL versions - if [ "${lib.versions.major postgresql.version}" = "15" ]; then - mv "$out/lib/plv8-${finalAttrs.version}.so" "$out/lib/plv8.so" - ln -s "$out/lib/plv8.so" "$out/lib/plv8-${finalAttrs.version}.so" - sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plv8.control" - sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plcoffee.control" - sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plls.control" - - ${lib.optionalString stdenv.isDarwin '' - install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8.so - install_name_tool -add_rpath "${postgresql}/lib" $out/lib/plv8.so - install_name_tool -add_rpath "${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so - install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8.so - ''} - - ${lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so - ''} - else - ${lib.optionalString stdenv.isDarwin '' - install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} - install_name_tool -add_rpath "${postgresql}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} - install_name_tool -add_rpath "${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} - install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} - ''} - - ${lib.optionalString (!stdenv.isDarwin) '' - ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} - ''} - fi - ''; - - meta = with lib; { - description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL"; - homepage = "https://plv8.github.io/"; - platforms = [ - "x86_64-linux" - "aarch64-linux" - "aarch64-darwin" - "x86_64-darwin" - ]; - license = licenses.postgresql; - }; -}) From b2947378473aa748265e422a5e96eb474647487e Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 18:17:22 +0100 Subject: [PATCH 43/52] fix(flake): remove nixpkgs-go124 and nix-fast-build dependencies Remove nixpkgs-go124 dependency since current nixpkgs has Go 1.25.4 which is sufficient for packer. Remove nix-fast-build input as unused and add follows directives to resolve duplicate dependencies. --- flake.nix | 9 ++++----- nix/packages/packer.nix | 4 +--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index a64077ef2..595cd2d96 100644 --- a/flake.nix +++ b/flake.nix @@ -14,14 +14,13 @@ nix-editor.inputs.nixpkgs.follows = "nixpkgs"; nix-editor.inputs.utils.follows = "flake-utils"; nix-editor.url = "github:snowfallorg/nix-editor"; + nix-eval-jobs.inputs.flake-parts.follows = "flake-parts"; + nix-eval-jobs.inputs.treefmt-nix.follows = "treefmt-nix"; nix-eval-jobs.url = "github:nix-community/nix-eval-jobs"; - nix-fast-build.inputs.flake-parts.follows = "flake-parts"; - nix-fast-build.inputs.nixpkgs.follows = "nixpkgs"; - nix-fast-build.inputs.treefmt-nix.follows = "treefmt-nix"; - nix-fast-build.url = "github:Mic92/nix-fast-build"; nix2container.inputs.nixpkgs.follows = "nixpkgs"; nix2container.url = "github:nlewo/nix2container"; - nixpkgs-go124.url = "github:Nixos/nixpkgs/d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0"; + # Pin to a specific nixpkgs version that has compatible v8 and curl versions + # for extensions that require older package versions nixpkgs-oldstable.url = "github:NixOS/nixpkgs/a76c4553d7e741e17f289224eda135423de0491d"; nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/nix/packages/packer.nix b/nix/packages/packer.nix index 0fd18d8de..aa0d797c9 100644 --- a/nix/packages/packer.nix +++ b/nix/packages/packer.nix @@ -1,14 +1,12 @@ { pkgs, - inputs, lib, fetchFromGitHub, installShellFiles, ... }: let - go124 = inputs.nixpkgs-go124.legacyPackages.${pkgs.system}.go_1_24; - buildGoModule = pkgs.buildGoModule.override { go = go124; }; + buildGoModule = pkgs.buildGoModule; in buildGoModule rec { pname = "packer"; From 6d4d45e48407bf3d2fa3fbdbf4c8eea28747ddaf Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 18:17:31 +0100 Subject: [PATCH 44/52] fix(flake): update flake.lock and cargo-pgrx hashes Run flake-linter to eliminate duplicate dependencies, and remove unused cargo-pgrx / rustc versions hashes. --- flake.lock | 110 +++++------------------------------ nix/cargo-pgrx/versions.json | 22 ++----- 2 files changed, 20 insertions(+), 112 deletions(-) diff --git a/flake.lock b/flake.lock index 3d7f987d6..4924941a8 100644 --- a/flake.lock +++ b/flake.lock @@ -34,27 +34,6 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nix-eval-jobs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1759362264, - "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -157,10 +136,14 @@ }, "nix-eval-jobs": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": [ + "flake-parts" + ], "nix": "nix", "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" + "treefmt-nix": [ + "treefmt-nix" + ] }, "locked": { "lastModified": 1760478325, @@ -176,32 +159,6 @@ "type": "github" } }, - "nix-fast-build": { - "inputs": { - "flake-parts": [ - "flake-parts" - ], - "nixpkgs": [ - "nixpkgs" - ], - "treefmt-nix": [ - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1764473437, - "narHash": "sha256-fJPxdBX25HuY9hb2NDo2prKRC103zHMseCEeFW1bKIw=", - "owner": "Mic92", - "repo": "nix-fast-build", - "rev": "b26ad640fa008af685c1efd7662ddd7a619e4a6d", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "nix-fast-build", - "type": "github" - } - }, "nix2container": { "inputs": { "nixpkgs": [ @@ -235,22 +192,6 @@ "url": "https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz" } }, - "nixpkgs-go124": { - "locked": { - "lastModified": 1754085309, - "narHash": "sha256-3RTSdhnqTcxS5wjKNEBpbt0hiSKfBZiQPlWHn90N1qQ=", - "owner": "Nixos", - "repo": "nixpkgs", - "rev": "d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0", - "type": "github" - }, - "original": { - "owner": "Nixos", - "repo": "nixpkgs", - "rev": "d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0", - "type": "github" - } - }, "nixpkgs-lib": { "locked": { "lastModified": 1761765539, @@ -284,11 +225,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1764950072, - "narHash": "sha256-lft4/rbh1nFSjHqQatxPEq3n68+iH7QmT5Tqr784e0Q=", - "rev": "f61125a668a320878494449750330ca58b78c557", + "lastModified": 1765186076, + "narHash": "sha256-fO54fp5kvvF8znmtV8QGwOsaBcB0NcFP41nC5Bhy/TM=", + "rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8", "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre907002.f61125a668a3/nixexprs.tar.xz?lastModified=1764950072&rev=f61125a668a320878494449750330ca58b78c557" + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre908783.addf7cf5f383/nixexprs.tar.xz?lastModified=1765186076&rev=addf7cf5f383a3101ecfba091b98d0a1263dc9b8" }, "original": { "type": "tarball", @@ -302,13 +243,11 @@ "git-hooks": "git-hooks", "nix-editor": "nix-editor", "nix-eval-jobs": "nix-eval-jobs", - "nix-fast-build": "nix-fast-build", "nix2container": "nix2container", "nixpkgs": "nixpkgs_2", - "nixpkgs-go124": "nixpkgs-go124", "nixpkgs-oldstable": "nixpkgs-oldstable", "rust-overlay": "rust-overlay", - "treefmt-nix": "treefmt-nix_2" + "treefmt-nix": "treefmt-nix" } }, "rust-overlay": { @@ -318,11 +257,11 @@ ] }, "locked": { - "lastModified": 1765161692, - "narHash": "sha256-XdY9AFzmgRPYIhP4N+WiCHMNxPoifP5/Ld+orMYBD8c=", + "lastModified": 1765248027, + "narHash": "sha256-ngar+yP06x3+2k2Iey29uU0DWx5ur06h3iPBQXlU+yI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7ed7e8c74be95906275805db68201e74e9904f07", + "rev": "7b50ad68415ae5be7ee4cc68fa570c420741b644", "type": "github" }, "original": { @@ -347,27 +286,6 @@ } }, "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nix-eval-jobs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1760120816, - "narHash": "sha256-gq9rdocpmRZCwLS5vsHozwB6b5nrOBDNc2kkEaTXHfg=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "761ae7aff00907b607125b2f57338b74177697ed", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixpkgs" diff --git a/nix/cargo-pgrx/versions.json b/nix/cargo-pgrx/versions.json index 184dbe9bc..7f28c940b 100644 --- a/nix/cargo-pgrx/versions.json +++ b/nix/cargo-pgrx/versions.json @@ -2,9 +2,6 @@ "0.6.1": { "hash": "sha256-O4eHVbJBudybsPab+zr2eXnfheREMqLAHAKm2GDbfrs=", "rust": { - "1.76.0": { - "cargoHash": "sha256-lcnUVO8dJET5g6wM1YgTsj4uP4I3vVZy5PWBKIsvLB8=" - }, "1.82.0": { "cargoHash": "sha256-lcnUVO8dJET5g6wM1YgTsj4uP4I3vVZy5PWBKIsvLB8=" } @@ -13,9 +10,6 @@ "0.7.1": { "hash": "sha256-t/gdlrBeP6KFkBFJiZUa8KKVJVYMf6753vQGKJdytss=", "rust": { - "1.76.0": { - "cargoHash": "sha256-bLS/pKJnwgcp38wAHej6vOkzVb/E2UHRCQ/OMDI6GqU=" - }, "1.82.0": { "cargoHash": "sha256-bLS/pKJnwgcp38wAHej6vOkzVb/E2UHRCQ/OMDI6GqU=" } @@ -26,9 +20,6 @@ "rust": { "1.70.0": { "cargoHash": "sha256-TGeHOA5kRZ7KclRfYj6V+/ZbPiPx/4xUyKxNm4o7ubM=" - }, - "1.76.0": { - "cargoHash": "sha256-TGeHOA5kRZ7KclRfYj6V+/ZbPiPx/4xUyKxNm4o7ubM=" } } }, @@ -37,9 +28,6 @@ "rust": { "1.70.0": { "cargoHash": "sha256-uc1/zWMLt5U0egsf3xu/5RxouSl0m+81qY+ZZd8BSxU=" - }, - "1.76.0": { - "cargoHash": "sha256-uc1/zWMLt5U0egsf3xu/5RxouSl0m+81qY+ZZd8BSxU=" } } }, @@ -60,6 +48,9 @@ "1.70.0": { "cargoHash": "sha256-TMuJ7kyMckCT4JJVWuEE14HpD5uw3Vjym96GA71vOMo=" }, + "1.76.0": { + "cargoHash": "sha256-TMuJ7kyMckCT4JJVWuEE14HpD5uw3Vjym96GA71vOMo=" + }, "1.85.1": { "cargoHash": "sha256-TMuJ7kyMckCT4JJVWuEE14HpD5uw3Vjym96GA71vOMo=" } @@ -68,9 +59,6 @@ "0.11.3": { "hash": "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU=", "rust": { - "1.70.0": { - "cargoHash": "sha256-giL077I5VzWJ+fAbxqp/Oc28Qjc7ontVm7of5LQz+uY=" - }, "1.76.0": { "cargoHash": "sha256-giL077I5VzWJ+fAbxqp/Oc28Qjc7ontVm7of5LQz+uY=" }, @@ -98,6 +86,9 @@ }, "1.84.0": { "cargoHash": "sha256-yZpD3FriL9UbzRtdFkfIfFfYIrRPYxr/lZ5rb0YBTPc=" + }, + "1.87.0": { + "cargoHash": "sha256-yZpD3FriL9UbzRtdFkfIfFfYIrRPYxr/lZ5rb0YBTPc=" } } }, @@ -125,5 +116,4 @@ } } } - } From 397153fa52da215b4bc16e726eeac59da0decfa4 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 18:40:20 +0100 Subject: [PATCH 45/52] fix(exts): remove remaining duplicated files Move pgrouting.nix to pgrouting/default.nix and groonga package to pgroonga/groonga.nix. Update imports and fix relative paths for versions.json and patch files. --- .../default.nix => ext/pgroonga/groonga.nix} | 0 .../{pgrouting.nix => pgrouting/default.nix} | 4 ++-- nix/packages/default.nix | 2 +- .../do-not-use-vendored-libraries.patch | 15 ------------- .../groonga/fix-cmake-install-path.patch | 21 ------------------- nix/packages/postgres.nix | 2 +- 6 files changed, 4 insertions(+), 40 deletions(-) rename nix/{packages/groonga/default.nix => ext/pgroonga/groonga.nix} (100%) rename nix/ext/{pgrouting.nix => pgrouting/default.nix} (97%) delete mode 100644 nix/packages/groonga/do-not-use-vendored-libraries.patch delete mode 100644 nix/packages/groonga/fix-cmake-install-path.patch diff --git a/nix/packages/groonga/default.nix b/nix/ext/pgroonga/groonga.nix similarity index 100% rename from nix/packages/groonga/default.nix rename to nix/ext/pgroonga/groonga.nix diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting/default.nix similarity index 97% rename from nix/ext/pgrouting.nix rename to nix/ext/pgrouting/default.nix index b3015786e..a05101dd8 100644 --- a/nix/ext/pgrouting.nix +++ b/nix/ext/pgrouting/default.nix @@ -12,7 +12,7 @@ let pname = "pgrouting"; # Load version configuration from external file - allVersions = (builtins.fromJSON (builtins.readFile ./versions.json)).${pname}; + allVersions = (builtins.fromJSON (builtins.readFile ../versions.json)).${pname}; # Filter versions compatible with current PostgreSQL version supportedVersions = lib.filterAttrs ( @@ -50,7 +50,7 @@ let }; patches = lib.optionals (version == "3.4.1" && lib.versionAtLeast postgresql.version "17") [ - ./pgrouting/pgrouting-3.4.1-pg17.patch + ./pgrouting-3.4.1-pg17.patch ]; #disable compile time warnings for incompatible pointer types only on macos and pg16 diff --git a/nix/packages/default.nix b/nix/packages/default.nix index ca7d5fa77..3ca8623e6 100644 --- a/nix/packages/default.nix +++ b/nix/packages/default.nix @@ -37,7 +37,7 @@ github-matrix = pkgs.callPackage ./github-matrix { nix-eval-jobs = inputs'.nix-eval-jobs.packages.default; }; - supabase-groonga = pkgs.callPackage ./groonga { }; + supabase-groonga = pkgs.callPackage ../ext/pgroonga/groonga.nix { }; http-mock-server = pkgs.callPackage ./http-mock-server.nix { }; local-infra-bootstrap = pkgs.callPackage ./local-infra-bootstrap.nix { }; mecab-naist-jdic = pkgs.callPackage ./mecab-naist-jdic.nix { }; diff --git a/nix/packages/groonga/do-not-use-vendored-libraries.patch b/nix/packages/groonga/do-not-use-vendored-libraries.patch deleted file mode 100644 index 6a005349d..000000000 --- a/nix/packages/groonga/do-not-use-vendored-libraries.patch +++ /dev/null @@ -1,15 +0,0 @@ -Do not use vendored libraries - ---- a/vendor/CMakeLists.txt -+++ b/vendor/CMakeLists.txt -@@ -14,10 +14,7 @@ - # License along with this library; if not, write to the Free Software - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - add_subdirectory(onigmo) --add_subdirectory(mruby) --add_subdirectory(mecab) --add_subdirectory(message_pack) - if(GRN_WITH_MRUBY) - add_subdirectory(groonga-log) - endif() \ No newline at end of file diff --git a/nix/packages/groonga/fix-cmake-install-path.patch b/nix/packages/groonga/fix-cmake-install-path.patch deleted file mode 100644 index 1fe317b6c..000000000 --- a/nix/packages/groonga/fix-cmake-install-path.patch +++ /dev/null @@ -1,21 +0,0 @@ -Fix CMake install path - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1141,11 +1141,11 @@ - - set(prefix "${CMAKE_INSTALL_PREFIX}") - set(exec_prefix "\${prefix}") --set(bindir "\${exec_prefix}/${CMAKE_INSTALL_BINDIR}") --set(sbindir "\${exec_prefix}/${CMAKE_INSTALL_SBINDIR}") --set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}") --set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") --set(datarootdir "\${prefix}/${CMAKE_INSTALL_DATAROOTDIR}") -+set(bindir "${CMAKE_INSTALL_FULL_BINDIR}") -+set(sbindir "${CMAKE_INSTALL_FULL_SBINDIR}") -+set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") -+set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") -+set(datarootdir "${CMAKE_INSTALL_FULL_DATAROOTDIR}") - set(datadir "\${datarootdir}") - set(expanded_pluginsdir "${GRN_PLUGINS_DIR}") - set(GRN_EXPANDED_DEFAULT_DOCUMENT_ROOT "${GRN_DEFAULT_DOCUMENT_ROOT}") \ No newline at end of file diff --git a/nix/packages/postgres.nix b/nix/packages/postgres.nix index aa6cc9e4c..611f60542 100644 --- a/nix/packages/postgres.nix +++ b/nix/packages/postgres.nix @@ -25,7 +25,7 @@ ../ext/pgjwt.nix ../ext/pgaudit.nix ../ext/postgis.nix - ../ext/pgrouting.nix + ../ext/pgrouting ../ext/pgtap.nix ../ext/pg_cron ../ext/pgsql-http.nix From ea64b6bebc8ce5dbc5e184d9685f6656040efff6 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 19:18:06 +0100 Subject: [PATCH 46/52] refactor(pgrx): conditionally apply rustc wrapper when < 0.12 Replace inline bash script generation with writeShellScriptBin for rustc wrapper that filters empty postmaster_stub.rs arguments. Apply wrapper only for pgrx < 0.12 since issue was fixed upstream in pgrx#1435 and pgrx#1441. --- nix/cargo-pgrx/buildPgrxExtension.nix | 93 ++++++++++++++------------- 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/nix/cargo-pgrx/buildPgrxExtension.nix b/nix/cargo-pgrx/buildPgrxExtension.nix index f091e93dd..a316015a5 100644 --- a/nix/cargo-pgrx/buildPgrxExtension.nix +++ b/nix/cargo-pgrx/buildPgrxExtension.nix @@ -28,7 +28,6 @@ # SOFTWARE. { lib, - bash, cargo-pgrx, pkg-config, rustPlatform, @@ -86,6 +85,27 @@ let fakeRustfmt = writeShellScriptBin "rustfmt" '' exit 0 ''; + + # Rustc wrapper for pgrx < 0.12.0 to filter out empty postmaster_stub.rs arguments + # This fixes an issue that causes build failures. + # Fixed upstream in pgcentralfoundation/pgrx#1435 and #1441, available from pgrx >= 0.12. + rustcWrapper = writeShellScriptBin "rustc" '' + # ORIGINAL_RUSTC is set in the buildPhase before this wrapper is added to PATH + original_rustc="''${ORIGINAL_RUSTC:-rustc}" + filtered_args=() + for arg in "$@"; do + if [[ -z "$arg" ]]; then + continue + fi + if [[ "$arg" =~ postmaster_stub\.rs$ ]]; then + if [[ ! -s "$arg" ]]; then + continue + fi + fi + filtered_args+=("$arg") + done + exec "$original_rustc" "''${filtered_args[@]}" + ''; maybeDebugFlag = lib.optionalString (buildType != "release") "--debug"; maybeEnterBuildAndTestSubdir = lib.optionalString (buildAndTestSubdir != null) '' export CARGO_TARGET_DIR="$(pwd)/target" @@ -94,6 +114,10 @@ let maybeLeaveBuildAndTestSubdir = lib.optionalString (buildAndTestSubdir != null) "popd"; pgrxBinaryName = if builtins.compareVersions "0.7.4" cargo-pgrx.version >= 0 then "pgx" else "pgrx"; + # The rustc wrapper is only needed for pgrx < 0.12.0 + # fixed upstream in pgcentralfoundation/pgrx#1435 and #1441 + needsRustcWrapper = builtins.compareVersions cargo-pgrx.version "0.12.0" < 0; + pgrxPostgresMajor = lib.versions.major postgresql.version; preBuildAndTest = '' export PGRX_HOME=$(mktemp -d) @@ -137,48 +161,31 @@ let ++ lib.optionals useFakeRustfmt [ fakeRustfmt ]; buildPhase = '' - runHook preBuild - - echo "Executing cargo-pgrx buildPhase" - ${preBuildAndTest} - ${maybeEnterBuildAndTestSubdir} - - export PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" - export PGX_BUILD_FLAGS="$PGRX_BUILD_FLAGS" - - # Wrap rustc to filter out empty postmaster_stub.rs arguments - original_rustc=$(command -v rustc) - mkdir -p $out/bin - cat > $out/bin/rustc << EOF - #!${bash}/bin/bash - filtered_args=() - for arg in "\$@"; do - if [[ -z "\$arg" ]]; then - continue - fi - if [[ "\$arg" =~ postmaster_stub\.rs$ ]]; then - if [[ ! -s "\$arg" ]]; then - continue - fi - fi - filtered_args+=("\$arg") - done - exec "$original_rustc" "\''${filtered_args[@]}" - EOF - chmod +x $out/bin/rustc - export PATH="$out/bin:$PATH" - export RUSTC="$out/bin/rustc" - - ${lib.optionalString stdenv.hostPlatform.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \ - cargo ${pgrxBinaryName} package \ - --pg-config ${lib.getDev postgresql}/bin/pg_config \ - ${maybeDebugFlag} \ - --features "${builtins.concatStringsSep " " buildFeatures}" \ - --out-dir "$out" - - ${maybeLeaveBuildAndTestSubdir} - - runHook postBuild + runHook preBuild + + echo "Executing cargo-pgrx buildPhase" + ${preBuildAndTest} + ${maybeEnterBuildAndTestSubdir} + + export PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" + export PGX_BUILD_FLAGS="$PGRX_BUILD_FLAGS" + + ${lib.optionalString needsRustcWrapper '' + export ORIGINAL_RUSTC="$(command -v ${stdenv.cc.targetPrefix}rustc || command -v rustc)" + export PATH="${rustcWrapper}/bin:$PATH" + export RUSTC="${rustcWrapper}/bin/rustc" + ''} + + ${lib.optionalString stdenv.hostPlatform.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \ + cargo ${pgrxBinaryName} package \ + --pg-config ${lib.getDev postgresql}/bin/pg_config \ + ${maybeDebugFlag} \ + --features "${builtins.concatStringsSep " " buildFeatures}" \ + --out-dir "$out" + + ${maybeLeaveBuildAndTestSubdir} + + runHook postBuild ''; preCheck = preBuildAndTest + args.preCheck or ""; From 431fab2a76f393ec05ebb438e3b04753c0e37677 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 19:47:52 +0100 Subject: [PATCH 47/52] refactor(nixpkgs): use let binding for oldstable instead of overlay Move nixpkgs-oldstable import to a let binding to avoid importing it three times... --- nix/nixpkgs.nix | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix index dbe20cef0..34bfae126 100644 --- a/nix/nixpkgs.nix +++ b/nix/nixpkgs.nix @@ -10,23 +10,19 @@ overlays = [ (import inputs.rust-overlay) self.overlays.default - (_final: _prev: { - # Provide older versions of packages required by some extensions - oldstable = import inputs.nixpkgs-oldstable { - inherit system; - config.allowUnfree = true; - }; - curl_8_6 = - (import inputs.nixpkgs-oldstable { + ( + let + # Provide older versions of packages required by some extensions + oldstable = import inputs.nixpkgs-oldstable { inherit system; config.allowUnfree = true; - }).curl; - v8_oldstable = - (import inputs.nixpkgs-oldstable { - inherit system; - config.allowUnfree = true; - }).v8; - }) + }; + in + _final: _prev: { + curl_8_6 = oldstable.curl; + v8_oldstable = oldstable.v8; + } + ) ]; }; }; From 1f0ed1f087caf72584f3e156c07a6d759100ef59 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 9 Dec 2025 19:50:14 +0100 Subject: [PATCH 48/52] refactor(groonga): move groonga package to pgroonga extension Remove supabase-groonga from global flake packages and import it locally in pgroonga extension instead. Other components access groonga via pgroonga.passthru.groonga since groonga is only used by pgroonga. --- nix/checks.nix | 3 +-- nix/ext/pgroonga/default.nix | 13 +++++++++++-- nix/ext/tests/pgroonga.nix | 5 ++--- nix/overlays/default.nix | 2 +- nix/packages/default.nix | 2 +- nix/packages/lib.nix | 2 +- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/nix/checks.nix b/nix/checks.nix index 99216dbd4..87eaf94d0 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -172,7 +172,6 @@ start-postgres-server-bin which getkey-script - supabase-groonga python3 netcat ]; @@ -258,7 +257,7 @@ export HTTP_MOCK_PORT #First we need to create a generic pg cluster for pgtap tests and run those - export GRN_PLUGINS_DIR=${pkgs.supabase-groonga}/lib/groonga/plugins + export GRN_PLUGINS_DIR=${pgroonga.passthru.groonga}/lib/groonga/plugins PGTAP_CLUSTER=$(mktemp -d) log info "Creating temporary PostgreSQL cluster at $PGTAP_CLUSTER" log_cmd initdb --locale=C --username=supabase_admin -D "$PGTAP_CLUSTER" diff --git a/nix/ext/pgroonga/default.nix b/nix/ext/pgroonga/default.nix index 89aca72a2..70878ce9d 100644 --- a/nix/ext/pgroonga/default.nix +++ b/nix/ext/pgroonga/default.nix @@ -9,10 +9,13 @@ makeWrapper, xxHash, buildEnv, - supabase-groonga, mecab-naist-jdic, + callPackage, }: let + # Import groonga locally since it's only used by pgroonga + supabase-groonga = callPackage ./groonga.nix { }; + pname = "pgroonga"; # Load version configuration from external file @@ -171,7 +174,13 @@ buildEnv { ''; passthru = { - inherit versions numberOfVersions pname; + inherit + versions + numberOfVersions + pname + supabase-groonga + ; + groonga = supabase-groonga; version = "multi-" + lib.concatStringsSep "-" (map (v: lib.replaceStrings [ "." ] [ "-" ] v) versions); }; diff --git a/nix/ext/tests/pgroonga.nix b/nix/ext/tests/pgroonga.nix index f40da3367..1968655da 100644 --- a/nix/ext/tests/pgroonga.nix +++ b/nix/ext/tests/pgroonga.nix @@ -84,9 +84,8 @@ self.inputs.nixpkgs.lib.nixos.runTest { self.packages.${pkgs.system}.mecab-naist-jdic }/lib/mecab/dic/naist-jdic"; systemd.services.postgresql.environment.MECAB_CONFIG = "${pkgs.mecab}/bin/mecab-config"; - systemd.services.postgresql.environment.GRN_PLUGINS_DIR = "${ - self.packages.${pkgs.system}.supabase-groonga - }/lib/groonga/plugins"; + systemd.services.postgresql.environment.GRN_PLUGINS_DIR = + "${(installedExtension "15").passthru.groonga}/lib/groonga/plugins"; specialisation.postgresql17.configuration = { services.postgresql = { diff --git a/nix/overlays/default.nix b/nix/overlays/default.nix index a5a18d5c9..046116cc2 100644 --- a/nix/overlays/default.nix +++ b/nix/overlays/default.nix @@ -10,7 +10,7 @@ postgresql_15 postgresql_17 postgresql_orioledb-17 - supabase-groonga + switch-ext-version mecab-naist-jdic ; diff --git a/nix/packages/default.nix b/nix/packages/default.nix index 3ca8623e6..bb4883099 100644 --- a/nix/packages/default.nix +++ b/nix/packages/default.nix @@ -37,7 +37,7 @@ github-matrix = pkgs.callPackage ./github-matrix { nix-eval-jobs = inputs'.nix-eval-jobs.packages.default; }; - supabase-groonga = pkgs.callPackage ../ext/pgroonga/groonga.nix { }; + http-mock-server = pkgs.callPackage ./http-mock-server.nix { }; local-infra-bootstrap = pkgs.callPackage ./local-infra-bootstrap.nix { }; mecab-naist-jdic = pkgs.callPackage ./mecab-naist-jdic.nix { }; diff --git a/nix/packages/lib.nix b/nix/packages/lib.nix index ef8f64069..3297dfb0b 100644 --- a/nix/packages/lib.nix +++ b/nix/packages/lib.nix @@ -3,7 +3,6 @@ psql_15, psql_orioledb-17, defaults, - supabase-groonga, system, }: { @@ -15,6 +14,7 @@ extraSubstitutions ? { }, }: let + supabase-groonga = pgroonga.passthru.groonga or (pkgs.callPackage ../ext/pgroonga/groonga.nix { }); paths = { migrationsDir = builtins.path { name = "migrations"; From 328f4dbd0c3dd05b9695129dfdeec0be842c31c4 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Thu, 11 Dec 2025 20:19:41 +0100 Subject: [PATCH 49/52] chore: bump version suffix to test --- ansible/vars.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/vars.yml b/ansible/vars.yml index c72e5b1ba..f75dc903d 100644 --- a/ansible/vars.yml +++ b/ansible/vars.yml @@ -10,9 +10,9 @@ postgres_major: # Full version strings for each major version postgres_release: - postgresorioledb-17: "17.6.0.021-orioledb" - postgres17: "17.6.1.064" - postgres15: "15.14.1.064" + postgresorioledb-17: "17.6.0.021-orioledb-update-nixpkgs-1" + postgres17: "17.6.1.064-update-nixpkgs-1" + postgres15: "15.14.1.064-update-nixpkgs-1" # Non Postgres Extensions pgbouncer_release: 1.19.0 From 0c2c43c8f49acad5db2cb3283201452ccd6e43d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Thu, 11 Dec 2025 22:17:58 +0100 Subject: [PATCH 50/52] refactor(devshell): improve devshell experience The current development shell include a large number of packages which leads to a very large closure size (5 Gb) and slow startup times. To improve the situation we defer installing large packages to devshell commands which only get installed when needed. We introduce the use of devshell to define the commands in a declarative way as well as to improve the overall developer experience. Included changes: - Add organized command menu with categories (check, ami, extension, postgres) - Add watch command using watchexec + nix-fast-build for continuous checking - Expose common tasks as named commands: fmt, check, lint, watch - Add aws-vault to development tools --- flake.lock | 21 ++++++++++ flake.nix | 2 + nix/checks.nix | 5 +-- nix/devShells.nix | 104 +++++++++++++++++++++++++++++++++++++++------- nix/nixpkgs.nix | 1 + 5 files changed, 115 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 4924941a8..bef513c6a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "devshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1764011051, + "narHash": "sha256-M7SZyPZiqZUR/EiiBJnmyUbOi5oE/03tCeFrTiUZchI=", + "owner": "numtide", + "repo": "devshell", + "rev": "17ed8d9744ebe70424659b0ef74ad6d41fc87071", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -238,6 +258,7 @@ }, "root": { "inputs": { + "devshell": "devshell", "flake-parts": "flake-parts", "flake-utils": "flake-utils", "git-hooks": "git-hooks", diff --git a/flake.nix b/flake.nix index 595cd2d96..2145185d1 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,8 @@ ]; }; inputs = { + devshell.url = "github:numtide/devshell"; + devshell.inputs.nixpkgs.follows = "nixpkgs"; flake-parts.url = "github:hercules-ci/flake-parts"; flake-utils.url = "github:numtide/flake-utils"; git-hooks.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/nix/checks.nix b/nix/checks.nix index 87eaf94d0..193e2a0f3 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -3,7 +3,6 @@ perSystem = { self', - system, pkgs, lib, ... @@ -394,6 +393,7 @@ packer pg_regress ; + devShell = self'.devShells.default; } // pkgs.lib.optionalAttrs (pkgs.stdenv.isLinux) ( { @@ -410,7 +410,6 @@ inherit self; inherit pkgs; }) - ) - // pkgs.lib.optionalAttrs (system == "x86_64-linux") ({ devShell = self'.devShells.default; }); + ); }; } diff --git a/nix/devShells.nix b/nix/devShells.nix index 03768a770..ef464b949 100644 --- a/nix/devShells.nix +++ b/nix/devShells.nix @@ -5,6 +5,7 @@ pkgs, self', config, + lib, ... }: let @@ -34,7 +35,7 @@ in { devShells = { - default = pkgs.mkShell { + default = pkgs.devshell.mkShell { packages = with pkgs; [ @@ -45,26 +46,99 @@ shellcheck ansible ansible-lint - self'.packages.packer - - self'.packages.start-server - self'.packages.start-client - self'.packages.start-replica - self'.packages.migrate-tool - self'.packages.sync-exts-versions - self'.packages.build-test-ami - self'.packages.run-testinfra - self'.packages.cleanup-ami + aws-vault + packer dbmate nushell pythonEnv config.treefmt.build.wrapper ] ++ self'.packages.docs.nativeBuildInputs; - shellHook = '' - export HISTFILE=.history - ${config.pre-commit.installationScript} - ''; + devshell.startup.pre-commit.text = config.pre-commit.installationScript; + commands = [ + { + name = "fmt"; + help = "Format code"; + command = "nix fmt"; + category = "check"; + } + { + name = "check"; + help = "Run all checks"; + command = "nix flake -L check -v"; + category = "check"; + } + { + name = "lint"; + help = "Lint code"; + command = "pre-commit run --all-files"; + category = "check"; + } + { + name = "watch"; + help = "Watch for file changes and run all checks"; + command = + let + watchExec = lib.getExe pkgs.watchexec; + nixFastBuild = '' + ${lib.getExe pkgs.nix} run github:Mic92/nix-fast-build -- \ + --skip-cached --retries=2 --no-download --option warn-dirty false \ + --option accept-flake-config true --no-link \ + --flake ".#checks.${pkgs.stdenv.hostPlatform.system}" + ''; + in + "${watchExec} --on-busy-update=queue -w . --ignore '.jj/*' --timings -- ${nixFastBuild}"; + category = "check"; + } + { + name = "cleanup-ami"; + help = "Deregister AMIs by name"; + command = "${lib.getExe self'.packages.cleanup-ami} $@"; + category = "ami"; + } + { + name = "build-test-ami"; + help = "Build AMI images for PostgreSQL testing"; + command = "${lib.getExe self'.packages.build-test-ami} $@"; + category = "ami"; + } + { + name = "sync-exts-versions"; + help = "Update extensions versions"; + command = "${lib.getExe self'.packages.sync-exts-versions}"; + category = "extension"; + } + { + name = "start-postgres-server"; + help = "Start a local Postgres server"; + command = "${lib.getExe pkgs.nix} run .#start-server -- $@"; + category = "postgres"; + } + { + name = "start-postgres-client"; + help = "Start an interactive psql with the specified Postgres version"; + command = "${lib.getExe pkgs.nix} run .#start-client -- $@"; + category = "postgres"; + } + { + name = "start-postgres-replica"; + help = "Start a local Postgres replica server"; + command = "${lib.getExe pkgs.nix} run .#start-replica -- $@"; + category = "postgres"; + } + { + name = "migrate-postgres"; + help = "Run database migrations"; + command = "${lib.getExe pkgs.nix} run .#migrate-tool -- $@"; + category = "postgres"; + } + { + name = "dbmate-tool"; + help = "Run dbmate against specified local Postgres database"; + command = "${lib.getExe pkgs.nix} run .#dbmate-tool -- $@"; + category = "postgres"; + } + ]; }; cargo-pgrx_0_11_3 = mkCargoPgrxDevShell { pgrxVersion = "0_11_3"; diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix index 34bfae126..34ba4bd60 100644 --- a/nix/nixpkgs.nix +++ b/nix/nixpkgs.nix @@ -23,6 +23,7 @@ v8_oldstable = oldstable.v8; } ) + inputs.devshell.overlays.default ]; }; }; From f69052f1fa53ef089e5d23bcea91040290669cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Thu, 11 Dec 2025 22:17:58 +0100 Subject: [PATCH 51/52] chore: migrate scripts generated by runCommand to writeShellApplication `writeShellApplication` avoids substitute commands, provides the correct package metadata and make sure that all scripts are shellcheked. --- nix/apps.nix | 34 +-- nix/packages/build-test-ami.nix | 80 +++---- nix/packages/cleanup-ami.nix | 49 ++-- nix/packages/dbmate-tool.nix | 354 +++++++++++++++++++++++++--- nix/packages/migrate-tool.nix | 134 ++++++++++- nix/packages/start-client.nix | 118 ++++++++-- nix/packages/start-replica.nix | 52 +++- nix/packages/start-replica.sh.in | 43 ---- nix/packages/sync-exts-versions.nix | 24 +- nix/tools/dbmate-tool.sh.in | 306 ------------------------ nix/tools/migrate-tool.sh.in | 123 ---------- nix/tools/run-client.sh.in | 107 --------- nix/tools/sync-exts-versions.sh.in | 119 +++++----- 13 files changed, 713 insertions(+), 830 deletions(-) delete mode 100644 nix/packages/start-replica.sh.in delete mode 100644 nix/tools/dbmate-tool.sh.in delete mode 100644 nix/tools/migrate-tool.sh.in delete mode 100644 nix/tools/run-client.sh.in diff --git a/nix/apps.nix b/nix/apps.nix index 75eaae49e..e277b7291 100644 --- a/nix/apps.nix +++ b/nix/apps.nix @@ -1,11 +1,11 @@ { ... }: { perSystem = - { self', ... }: + { self', lib, ... }: let - mkApp = attrName: binName: { + mkApp = attrName: { type = "app"; - program = "${self'.packages."${attrName}"}/bin/${binName}"; + program = lib.getExe self'.packages."${attrName}"; }; in { @@ -13,20 +13,20 @@ # these are distinct from the things that can be built with 'nix build', # so they need to be listed here too. apps = { - start-server = mkApp "start-server" "start-postgres-server"; - start-client = mkApp "start-client" "start-postgres-client"; - start-replica = mkApp "start-replica" "start-postgres-replica"; - # migrate-postgres = mkApp "migrate-tool" "migrate-postgres"; - # sync-exts-versions = mkApp "sync-exts-versions" "sync-exts-versions"; - pg-restore = mkApp "pg-restore" "pg-restore"; - local-infra-bootstrap = mkApp "local-infra-bootstrap" "local-infra-bootstrap"; - dbmate-tool = mkApp "dbmate-tool" "dbmate-tool"; - update-readme = mkApp "update-readme" "update-readme"; - show-commands = mkApp "show-commands" "show-commands"; - build-test-ami = mkApp "build-test-ami" "build-test-ami"; - run-testinfra = mkApp "run-testinfra" "run-testinfra"; - cleanup-ami = mkApp "cleanup-ami" "cleanup-ami"; - trigger-nix-build = mkApp "trigger-nix-build" "trigger-nix-build"; + start-server = mkApp "start-server"; + start-client = mkApp "start-client"; + start-replica = mkApp "start-replica"; + # migrate-postgres = mkApp "migrate-tool"; + # sync-exts-versions = mkApp "sync-exts-versions"; + pg-restore = mkApp "pg-restore"; + local-infra-bootstrap = mkApp "local-infra-bootstrap"; + dbmate-tool = mkApp "dbmate-tool"; + update-readme = mkApp "update-readme"; + show-commands = mkApp "show-commands"; + build-test-ami = mkApp "build-test-ami"; + run-testinfra = mkApp "run-testinfra"; + cleanup-ami = mkApp "cleanup-ami"; + trigger-nix-build = mkApp "trigger-nix-build"; }; }; } diff --git a/nix/packages/build-test-ami.nix b/nix/packages/build-test-ami.nix index 9a1d4c5d6..99a16869a 100644 --- a/nix/packages/build-test-ami.nix +++ b/nix/packages/build-test-ami.nix @@ -1,23 +1,29 @@ -{ pkgs, runCommand }: -runCommand "build-test-ami" - { - buildInputs = with pkgs; [ - packer - awscli2 - yq - jq - openssl - git - coreutils - aws-vault - ]; - } - '' - mkdir -p $out/bin - cat > $out/bin/build-test-ami << 'EOL' - #!/usr/bin/env bash - set -euo pipefail - +{ + writeShellApplication, + packer, + awscli2, + yq, + jq, + openssl, + gitMinimal, + coreutils, + aws-vault, + python3, +}: +writeShellApplication { + name = "build-test-ami"; + runtimeInputs = [ + packer + awscli2 + yq + jq + openssl + gitMinimal + coreutils + aws-vault + python3 + ]; + text = '' show_help() { cat << EOF Usage: build-test-ami [--help] @@ -52,30 +58,6 @@ runCommand "build-test-ami" exit 0 fi - export PATH="${ - pkgs.lib.makeBinPath ( - with pkgs; - [ - packer - awscli2 - yq - jq - openssl - git - coreutils - aws-vault - ] - ) - }:$PATH" - - # Check for required tools - for cmd in packer aws-vault yq jq openssl; do - if ! command -v $cmd &> /dev/null; then - echo "Error: $cmd is required but not found" - exit 1 - fi - done - # Check AWS Vault profile if [ -z "''${AWS_VAULT:-}" ]; then echo "Error: AWS_VAULT environment variable must be set with the profile name" @@ -140,18 +122,18 @@ runCommand "build-test-ami" VENV_DIR=$(mktemp -d) trap 'rm -rf "$VENV_DIR"' EXIT HUP INT QUIT TERM python3 -m venv "$VENV_DIR" + # shellcheck source=/dev/null source "$VENV_DIR/bin/activate" # Install required Python packages echo "Installing required Python packages..." - pip install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest paramiko requests + pip install boto3 'boto3-stubs[essential]' docker ec2instanceconnectcli pytest paramiko requests # Run the tests with aws-vault echo "Running tests for AMI: $RANDOM_STRING using AWS Vault profile: $AWS_VAULT_PROFILE" - aws-vault exec $AWS_VAULT_PROFILE -- pytest -vv -s testinfra/test_ami_nix.py + aws-vault exec "$AWS_VAULT_PROFILE" -- pytest -vv -s testinfra/test_ami_nix.py # Deactivate virtual environment (cleanup is handled by trap) deactivate - EOL - chmod +x $out/bin/build-test-ami - '' + ''; +} diff --git a/nix/packages/cleanup-ami.nix b/nix/packages/cleanup-ami.nix index f1f9cde27..9bd670804 100644 --- a/nix/packages/cleanup-ami.nix +++ b/nix/packages/cleanup-ami.nix @@ -1,35 +1,15 @@ -{ pkgs, runCommand }: -runCommand "cleanup-ami" - { - buildInputs = with pkgs; [ - awscli2 - aws-vault - ]; - } - '' - mkdir -p $out/bin - cat > $out/bin/cleanup-ami << 'EOL' - #!/usr/bin/env bash - set -euo pipefail - - export PATH="${ - pkgs.lib.makeBinPath ( - with pkgs; - [ - awscli2 - aws-vault - ] - ) - }:$PATH" - - # Check for required tools - for cmd in aws-vault; do - if ! command -v $cmd &> /dev/null; then - echo "Error: $cmd is required but not found" - exit 1 - fi - done - +{ + writeShellApplication, + awscli2, + aws-vault, +}: +writeShellApplication { + name = "cleanup-ami"; + runtimeInputs = [ + awscli2 + aws-vault + ]; + text = '' # Check AWS Vault profile if [ -z "''${AWS_VAULT:-}" ]; then echo "Error: AWS_VAULT environment variable must be set with the profile name" @@ -56,6 +36,5 @@ runCommand "cleanup-ami" aws ec2 deregister-image --region $REGION --image-id "$ami_id" || true done done - EOL - chmod +x $out/bin/cleanup-ami - '' + ''; +} diff --git a/nix/packages/dbmate-tool.nix b/nix/packages/dbmate-tool.nix index 7ce2c5031..a4c71f034 100644 --- a/nix/packages/dbmate-tool.nix +++ b/nix/packages/dbmate-tool.nix @@ -1,5 +1,10 @@ { - pkgs, + writeShellApplication, + overmind, + dbmate, + nix, + jq, + yq, system, defaults, }: @@ -9,37 +14,316 @@ let pgbouncerAuthSchemaSql = ../../ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql; statExtensionSql = ../../ansible/files/stat_extension.sql; in -pkgs.runCommand "dbmate-tool" - { - buildInputs = with pkgs; [ - overmind - dbmate - nix - jq - yq - ]; - nativeBuildInputs = with pkgs; [ makeWrapper ]; - } - '' - mkdir -p $out/bin $out/migrations - cp -r ${migrationsDir}/* $out - substitute ${../tools/dbmate-tool.sh.in} $out/bin/dbmate-tool \ - --subst-var-by 'PGSQL_DEFAULT_PORT' '${defaults.port}' \ - --subst-var-by 'MIGRATIONS_DIR' $out \ - --subst-var-by 'PGSQL_SUPERUSER' '${defaults.superuser}' \ - --subst-var-by 'ANSIBLE_VARS' ${ansibleVars} \ - --subst-var-by 'CURRENT_SYSTEM' '${system}' \ - --subst-var-by 'PGBOUNCER_AUTH_SCHEMA_SQL' '${pgbouncerAuthSchemaSql}' \ - --subst-var-by 'STAT_EXTENSION_SQL' '${statExtensionSql}' - chmod +x $out/bin/dbmate-tool - wrapProgram $out/bin/dbmate-tool \ - --prefix PATH : ${ - pkgs.lib.makeBinPath [ - pkgs.overmind - pkgs.dbmate - pkgs.nix - pkgs.jq - pkgs.yq - ] - } - '' +writeShellApplication { + name = "dbmate-tool"; + runtimeInputs = [ + overmind + dbmate + nix + jq + yq + ]; + text = '' + # Default values + PSQL_VERSION="ALL" + PORTNO="${defaults.port}" + PGSQL_SUPERUSER="${defaults.superuser}" + PGPASSWORD="''${PGPASSWORD:-postgres}" + PGSQL_USER="postgres" + FLAKE_URL="github:supabase/postgres" + MIGRATIONS_DIR="${migrationsDir}" + CURRENT_SYSTEM="${system}" + ANSIBLE_VARS="${ansibleVars}" + PGBOUNCER_AUTH_SCHEMA_SQL="${pgbouncerAuthSchemaSql}" + STAT_EXTENSION_SQL="${statExtensionSql}" + + # Start PostgreSQL using nix + start_postgres() { + DATDIR=$(mktemp -d) + echo "Starting PostgreSQL in directory: $DATDIR" # Create the DATDIR if it doesn't exist + nix run "$FLAKE_URL#start-server" -- "$PSQL_VERSION" --skip-migrations --daemonize --datdir "$DATDIR" + echo "PostgreSQL started." + } + + # Cleanup function + cleanup() { + echo "Cleaning up..." + + # Check if PostgreSQL processes exist + if pgrep -f "postgres" >/dev/null; then + echo "Stopping PostgreSQL gracefully..." + + # Use pg_ctl to stop PostgreSQL + pg_ctl -D "$DATDIR" stop + + # Wait a bit for graceful shutdown + sleep 5 + + # Check if processes are still running + if pgrep -f "postgres" >/dev/null; then + echo "Warning: Some PostgreSQL processes could not be stopped gracefully." + fi + else + echo "PostgreSQL is not running, skipping stop." + fi + + # Always exit successfully, log any remaining processes + if pgrep -f "postgres" >/dev/null; then + echo "Warning: Some PostgreSQL processes could not be cleaned up:" + pgrep -f "postgres" + else + echo "Cleanup completed successfully" + fi + } + + + # Function to display help + print_help() { + echo "Usage: nix run .#dbmate-tool -- [options]" + echo + echo "Options:" + echo " -v, --version [15|17|orioledb-17|all] Specify the PostgreSQL version to use (required defaults to --version all)" + echo " -p, --port PORT Specify the port number to use (default: 5435)" + echo " -h, --help Show this help message" + echo " -f, --flake-url URL Specify the flake URL to use (default: github:supabase/postgres)" + echo "Description:" + echo " Runs 'dbmate up' against a locally running the version of database you specify. Or 'all' to run against all versions." + echo " NOTE: To create a migration, you must run 'nix develop' and then 'dbmate new ' to create a new migration file." + echo + echo "Examples:" + echo " nix run .#dbmate-tool" + echo " nix run .#dbmate-tool -- --version 15" + echo " nix run .#dbmate-tool -- --version 16 --port 5433" + echo " nix run .#dbmate-tool -- --version 16 --port 5433 --flake-url github:supabase/postgres/" + } + + # Parse arguments + while [[ "$#" -gt 0 ]]; do + case "$1" in + -v|--version) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PSQL_VERSION="$2" + shift 2 + else + echo "Error: --version requires an argument (15, 16, or orioledb-17)" + exit 1 + fi + ;; + -u|--user) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PGSQL_USER="$2" + shift 2 + else + echo "Error: --user requires an argument" + exit 1 + fi + ;; + -f|--flake-url) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + FLAKE_URL="$2" + shift 2 + else + echo "Error: --flake-url requires an argument" + exit 1 + fi + ;; + -p|--port) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PORTNO="$2" + shift 2 + else + echo "Error: --port requires an argument" + exit 1 + fi + ;; + -h|--help) + print_help + exit 0 + ;; + *) + echo "Unknown option: $1" + print_help + exit 1 + ;; + esac + done + + # Function to wait for PostgreSQL to be ready + wait_for_postgres() { + local max_attempts=30 # Increased significantly + local attempt=1 + + # Give PostgreSQL a moment to actually start the process + sleep 2 + + while [ $attempt -le $max_attempts ]; do + "''${PSQLBIN}/pg_isready" -h localhost -p "$PORTNO" -U "$PGSQL_SUPERUSER" -d postgres + local status=$? + + if [ $status -eq 0 ]; then + echo "PostgreSQL is ready!" + return 0 + fi + echo "Waiting for PostgreSQL to start (attempt $attempt/$max_attempts)..." + sleep 2 + attempt=$((attempt + 1)) + done + + echo "PostgreSQL failed to start after $max_attempts attempts" + return 1 + } + + check_orioledb_ready() { + local max_attempts=30 + local attempt=1 + + while [ $attempt -le $max_attempts ]; do + if "''${PSQLBIN}/psql" -v ON_ERROR_STOP=1 -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres -c "SELECT * FROM pg_am WHERE amname = 'orioledb'" | grep -q orioledb; then + echo "Orioledb extension is ready!" + return 0 + fi + echo "Waiting for orioledb to be ready (attempt $attempt/$max_attempts)..." + sleep 2 + attempt=$((attempt + 1)) + done + + echo "Orioledb failed to initialize after $max_attempts attempts" + return 1 + } + + perform_dump() { + local max_attempts=3 + local attempt=1 + + while [ $attempt -le $max_attempts ]; do + echo "Attempting pg_dump (attempt $attempt/$max_attempts)" + + # Build the dump command + local dump_cmd="''${PSQLBIN}/pg_dump -h localhost -p $PORTNO -U $PGSQL_SUPERUSER -d postgres --schema-only --no-owner --no-privileges" + + # Only use --restrict-key for standard PostgreSQL 15 and 17 versions + # OrioleDB doesn't support this flag yet + if [ "$PSQL_VERSION" = "15" ] || [ "$PSQL_VERSION" = "17" ] || [ "$PSQL_VERSION" = "orioledb-17" ]; then + # Use a fixed restrict key for reproducible test dumps + # This is safe in testing contexts but should not be used in production + dump_cmd="$dump_cmd --restrict-key=SupabaseTestDumpKey123" + echo "Using --restrict-key for reproducible dumps (PostgreSQL $PSQL_VERSION)" + else + echo "Skipping --restrict-key (version: $PSQL_VERSION)" + fi + + if $dump_cmd > "./db/schema.sql"; then + return 0 + fi + + echo "Dump attempt $attempt failed, waiting before retry..." + sleep 5 + attempt=$((attempt + 1)) + done + + echo "All dump attempts failed" + return 1 + } + + migrate_version() { + echo "PSQL_VERSION: $PSQL_VERSION" + #pkill -f "postgres" || true # Ensure PostgreSQL is stopped before starting + PSQLBIN=$(nix build --no-link "$FLAKE_URL#psql_$PSQL_VERSION/bin" --json | jq -r '.[].outputs.out + "/bin"') + echo "Using PostgreSQL version $PSQL_VERSION from $PSQLBIN" + + # Start PostgreSQL + start_postgres + echo "Waiting for PostgreSQL to be ready..." + + # Wait for PostgreSQL to be ready to accept connections + if ! wait_for_postgres; then + echo "Failed to connect to PostgreSQL server" + cleanup + exit 1 + fi + + if [ "$PSQL_VERSION" = "orioledb-17" ]; then + if ! check_orioledb_ready; then + echo "Failed to initialize orioledb extension" + exit 1 + fi + fi + + echo "PostgreSQL server is ready" + + # Configure PostgreSQL roles and permissions + if ! "''${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres <<-EOSQL + create role postgres superuser login password '$PGPASSWORD'; + alter database postgres owner to postgres; + EOSQL + then + echo "Failed to configure PostgreSQL roles and permissions" + exit 1 + fi + "''${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -d postgres -f "$PGBOUNCER_AUTH_SCHEMA_SQL" + "''${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -d postgres -f "$STAT_EXTENSION_SQL" + + # Set db url to run dbmate + export DATABASE_URL="postgres://$PGSQL_USER:$PGPASSWORD@localhost:$PORTNO/postgres?sslmode=disable" + # Export path so dbmate can find correct psql and pg_dump + export PATH="$PSQLBIN:$PATH" + # Run init scripts + if ! dbmate --migrations-dir "$MIGRATIONS_DIR/init-scripts" up; then + echo "Error: Initial migration failed" + exit 1 + fi + + # Password update command + if ! "''${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -c "ALTER USER supabase_admin WITH PASSWORD '$PGPASSWORD'"; then + echo "Error: Failed to update supabase_admin password" + exit 1 + fi + + # Set up database URL + export DATABASE_URL="postgres://$PGSQL_SUPERUSER:$PGPASSWORD@localhost:$PORTNO/postgres?sslmode=disable" + # Run migrations + if ! dbmate --migrations-dir "$MIGRATIONS_DIR/migrations" up; then + echo "Error: Final migration failed" + exit 1 + fi + + echo "Running dbmate dump with $PSQLBIN" + perform_dump + + echo "CURRENT_SYSTEM: $CURRENT_SYSTEM" + if [ -f "./db/schema.sql" ]; then + cp "./db/schema.sql" "./migrations/schema-$PSQL_VERSION.sql" + echo "Schema file moved to ./migrations/schema-$PSQL_VERSION.sql" + echo "PSQLBIN is $PSQLBIN" + else + echo "Warning: schema.sql file not found in ./db directory" + exit 1 + fi + + # If we get here, all commands succeeded + echo "PostgreSQL migration completed successfully" + echo "Check migrations are idempotent" + for sql in ./migrations/db/migrations/*.sql; do + echo "$0: running $sql" + "''${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres -f "$sql" || { + echo "Failed to execute $sql" + exit 1 + } + done + } + + if [ "$PSQL_VERSION" == "all" ]; then + VERSIONS=$(yq '.postgres_major[]' "$ANSIBLE_VARS" | tr -d '"') + echo "$VERSIONS" | while read -r version; do + PSQL_VERSION="$version" + echo "Migrating to PostgreSQL version $PSQL_VERSION" + migrate_version + cleanup + done + else + echo "Migrating to PostgreSQL version $PSQL_VERSION" + migrate_version + cleanup + fi + ''; +} diff --git a/nix/packages/migrate-tool.nix b/nix/packages/migrate-tool.nix index 57f218a63..c98992110 100644 --- a/nix/packages/migrate-tool.nix +++ b/nix/packages/migrate-tool.nix @@ -1,18 +1,128 @@ -{ runCommand, psql_15 }: +{ writeShellApplication, psql_15 }: let configFile = ../tests/postgresql.conf.in; getkeyScript = ../tests/util/pgsodium_getkey.sh; primingScript = ../tests/prime.sql; migrationData = ../tests/migrations/data.sql; in -runCommand "migrate-postgres" { } '' - mkdir -p $out/bin - substitute ${../tools/migrate-tool.sh.in} $out/bin/migrate-postgres \ - --subst-var-by 'PSQL15_BINDIR' '${psql_15}' \ - --subst-var-by 'PSQL_CONF_FILE' '${configFile}' \ - --subst-var-by 'PGSODIUM_GETKEY' '${getkeyScript}' \ - --subst-var-by 'PRIMING_SCRIPT' '${primingScript}' \ - --subst-var-by 'MIGRATION_DATA' '${migrationData}' - - chmod +x $out/bin/migrate-postgres -'' +writeShellApplication { + name = "migrate-postgres"; + runtimeInputs = [ ]; + text = '' + # first argument is the old version; a path 15 or 16 + if [[ $1 == /nix/store* ]]; then + if [ ! -L "$1/receipt.json" ] || [ ! -e "$1/receipt.json" ]; then + echo "ERROR: $1 does not look like a valid Postgres install" + exit 1 + fi + OLDVER="$1" + elif [ "$1" == "15" ]; then + OLDVER="${psql_15}" + elif [ "$1" == "16" ]; then + echo "ERROR: PSQL 16 is not configured in this package" + exit 1 + else + echo "Please provide a valid Postgres version (15 or 16), or a /nix/store path" + exit 1 + fi + + # second argument is the new version; 15 or 16 + if [[ $2 == /nix/store* ]]; then + if [ ! -L "$2/receipt.json" ] || [ ! -e "$2/receipt.json" ]; then + echo "ERROR: $1 does not look like a valid Postgres install" + exit 1 + fi + NEWVER="$2" + elif [ "$2" == "15" ]; then + NEWVER="${psql_15}" + elif [ "$2" == "16" ]; then + echo "ERROR: PSQL 16 is not configured in this package" + exit 1 + else + echo "Please provide a valid Postgres version (15 or 16), or a /nix/store path" + exit 1 + fi + + # thid argument is the upgrade method: either pg_dumpall or pg_ugprade + if [ "$3" != "pg_dumpall" ] && [ "$3" != "pg_upgrade" ]; then + echo "Please provide a valid upgrade method (pg_dumpall or pg_upgrade)" + exit 1 + fi + UPGRADE_METHOD="$3" + + echo "Old server build: PSQL $1" + echo "New server build: PSQL $2" + echo "Upgrade method: $UPGRADE_METHOD" + + DATDIR=$(mktemp -d) + NEWDAT=$(mktemp -d) + mkdir -p "$DATDIR" "$NEWDAT" + + echo "NOTE: using temporary directory $DATDIR for PSQL $1 data, which will not be removed" + echo "NOTE: you are free to re-use this data directory at will" + echo + + "$OLDVER/bin/initdb" -D "$DATDIR" --locale=C --username=supabase_admin + "$NEWVER/bin/initdb" -D "$NEWDAT" --locale=C --username=supabase_admin + + # NOTE (aseipp): we need to patch postgresql.conf to have the right pgsodium_getkey script + PSQL_CONF_FILE="${configFile}" + PGSODIUM_GETKEY_SCRIPT="${getkeyScript}" + echo "NOTE: patching postgresql.conf files" + for x in "$DATDIR" "$NEWDAT"; do + sed \ + "s#@PGSODIUM_GETKEY_SCRIPT@#$PGSODIUM_GETKEY_SCRIPT#g" \ + "$PSQL_CONF_FILE" > "$x/postgresql.conf" + done + + echo "NOTE: Starting first server (v''${1}) to load data into the system" + "$OLDVER/bin/pg_ctl" start -D "$DATDIR" + + PRIMING_SCRIPT="${primingScript}" + MIGRATION_DATA="${migrationData}" + + "$OLDVER/bin/psql" -h localhost -d postgres -Xf "$PRIMING_SCRIPT" + "$OLDVER/bin/psql" -h localhost -d postgres -Xf "$MIGRATION_DATA" + + if [ "$UPGRADE_METHOD" == "pg_upgrade" ]; then + echo "NOTE: Stopping old server (v''${1}) to prepare for migration" + "$OLDVER/bin/pg_ctl" stop -D "$DATDIR" + + echo "NOTE: Migrating old data $DATDIR to $NEWDAT using pg_upgrade" + + export PGDATAOLD="$DATDIR" + export PGDATANEW="$NEWDAT" + export PGBINOLD="$OLDVER/bin" + export PGBINNEW="$NEWVER/bin" + + if ! "$NEWVER/bin/pg_upgrade" --check; then + echo "ERROR: pg_upgrade check failed" + exit 1 + fi + + echo "NOTE: pg_upgrade check passed, proceeding with migration" + "$NEWVER/bin/pg_upgrade" + rm -f delete_old_cluster.sh # we don't need this + exit 0 + fi + + if [ "$UPGRADE_METHOD" == "pg_dumpall" ]; then + SQLDAT="$DATDIR/dump.sql" + echo "NOTE: Exporting data via pg_dumpall ($SQLDAT)" + "$NEWVER/bin/pg_dumpall" -h localhost > "$SQLDAT" + + echo "NOTE: Stopping old server (v''${1}) to prepare for migration" + "$OLDVER/bin/pg_ctl" stop -D "$DATDIR" + + echo "NOTE: Starting second server (v''${2}) to load data into the system" + "$NEWVER/bin/pg_ctl" start -D "$NEWDAT" + + echo "NOTE: Loading data into new server (v''${2}) via 'cat | psql'" + cat "$SQLDAT" | "$NEWVER/bin/psql" -h localhost -d postgres + + printf "\n\n\n\n" + echo "NOTE: Done, check logs. Stopping the server; new database is located at $NEWDAT" + "$NEWVER/bin/pg_ctl" stop -D "$NEWDAT" + fi + ''; +} diff --git a/nix/packages/start-client.nix b/nix/packages/start-client.nix index 84ab06209..a8f4200d9 100644 --- a/nix/packages/start-client.nix +++ b/nix/packages/start-client.nix @@ -1,27 +1,103 @@ { - runCommand, + writeShellApplication, psql_15, psql_17, psql_orioledb-17, defaults, }: -let - migrationsDir = ../../migrations/db; - postgresqlSchemaSql = ../tools/postgresql_schema.sql; - pgbouncerAuthSchemaSql = ../../ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql; - statExtensionSql = ../../ansible/files/stat_extension.sql; -in -runCommand "start-postgres-client" { } '' - mkdir -p $out/bin - substitute ${../tools/run-client.sh.in} $out/bin/start-postgres-client \ - --subst-var-by 'PGSQL_DEFAULT_PORT' '${defaults.port}' \ - --subst-var-by 'PGSQL_SUPERUSER' '${defaults.superuser}' \ - --subst-var-by 'PSQL15_BINDIR' '${psql_15}' \ - --subst-var-by 'PSQL17_BINDIR' '${psql_17}' \ - --subst-var-by 'PSQLORIOLEDB17_BINDIR' '${psql_orioledb-17}' \ - --subst-var-by 'MIGRATIONS_DIR' '${migrationsDir}' \ - --subst-var-by 'POSTGRESQL_SCHEMA_SQL' '${postgresqlSchemaSql}' \ - --subst-var-by 'PGBOUNCER_AUTH_SCHEMA_SQL' '${pgbouncerAuthSchemaSql}' \ - --subst-var-by 'STAT_EXTENSION_SQL' '${statExtensionSql}' - chmod +x $out/bin/start-postgres-client -'' +writeShellApplication { + name = "start-postgres-client"; + runtimeInputs = [ ]; + text = '' + # Default values + PSQL_VERSION="15" + PORTNO="${defaults.port}" + PSQL_USER="postgres" + + # Function to display help + print_help() { + echo "Usage: nix run .#start-client -- [options]" + echo + echo "Options:" + echo " -v, --version [15|17|orioledb-17] Specify the PostgreSQL version to use (default: 15)" + echo " -u, --user USER Specify the user/role to use (default: postgres)" + echo " -p, --port PORT Specify the port (default: ${defaults.port})" + echo " -h, --help Show this help message" + echo + echo "Description:" + echo " Starts an interactive 'psql' session connecting to a Postgres database started with the" + echo " 'nix run .#start-server' command." + echo + echo "Examples:" + echo " nix run .#start-client" + echo " nix run .#start-client -- --version 15" + echo " nix run .#start-client -- --version 17 --port 5433" + echo " nix run .#start-client -- --version 17 --user supabase_admin" + } + + # Parse arguments + while [[ "$#" -gt 0 ]]; do + case "$1" in + -v|--version) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PSQL_VERSION="$2" + shift 2 + else + echo "Error: --version requires an argument (15, 17, or orioledb-17)" + exit 1 + fi + ;; + -u|--user) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PSQL_USER="$2" + shift 2 + else + echo "Error: --user requires an argument" + exit 1 + fi + ;; + -p|--port) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PORTNO="$2" + shift 2 + else + echo "Error: --port requires an argument" + exit 1 + fi + ;; + -h|--help) + print_help + exit 0 + ;; + *) + echo "Unknown option: $1" + print_help + exit 1 + ;; + esac + done + + # Determine PostgreSQL version + if [ "$PSQL_VERSION" == "15" ]; then + echo "Starting client for PSQL 15" + BINDIR="${psql_15}" + elif [ "$PSQL_VERSION" == "17" ]; then + echo "Starting client for PSQL 17" + BINDIR="${psql_17}" + elif [ "$PSQL_VERSION" == "orioledb-17" ]; then + echo "Starting client for PSQL ORIOLEDB 17" + BINDIR="${psql_orioledb-17}" + else + echo "Please provide a valid Postgres version (15, 17, or orioledb-17)" + exit 1 + fi + + # Set up environment for psql + export PATH="$BINDIR/bin:$PATH" + export POSTGRES_DB=postgres + export POSTGRES_HOST=localhost + + # Start interactive psql session + exec psql -U "$PSQL_USER" -p "$PORTNO" -h localhost postgres + ''; +} diff --git a/nix/packages/start-replica.nix b/nix/packages/start-replica.nix index 129ccd9cc..bd63764fa 100644 --- a/nix/packages/start-replica.nix +++ b/nix/packages/start-replica.nix @@ -1,12 +1,48 @@ { - runCommand, + writeShellApplication, pgsqlSuperuser, psql_15, }: -runCommand "start-postgres-replica" { } '' - mkdir -p $out/bin - substitute ${./start-replica.sh.in} $out/bin/start-postgres-replica \ - --subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \ - --subst-var-by 'PSQL15_BINDIR' '${psql_15}' - chmod +x $out/bin/start-postgres-replica -'' +writeShellApplication { + name = "start-postgres-replica"; + runtimeInputs = [ ]; + text = '' + # first argument should be '15' or '16' for the version + if [ "$1" == "15" ]; then + echo "Starting server for PSQL 15" + BINDIR="${psql_15}" + elif [ "$1" == "16" ]; then + echo "Starting server for PSQL 16" + echo "Error: PSQL 16 is not configured in this package" + exit 1 + elif [ "$1" == "orioledb-16" ]; then + echo "Starting server for PSQL ORIOLEDB 16" + echo "Error: PSQL ORIOLEDB 16 is not configured in this package" + exit 1 + else + echo "Please provide a valid Postgres version (15, 16 or orioledb-16)" + exit 1 + fi + + export PATH="$BINDIR/bin:$PATH" + + PGSQL_SUPERUSER="${pgsqlSuperuser}" + MASTER_PORTNO="$2" + REPLICA_PORTNO="$3" + REPLICA_SLOT="replica_$RANDOM" + DATDIR=$(mktemp -d) + mkdir -p "$DATDIR" + + echo "NOTE: runing pg_basebackup for server on port $MASTER_PORTNO" + echo "NOTE: using replica slot $REPLICA_SLOT" + + pg_basebackup -p "$MASTER_PORTNO" -h localhost -U "''${PGSQL_SUPERUSER}" -X stream -C -S "$REPLICA_SLOT" -v -R -D "$DATDIR" + + echo "NOTE: using port $REPLICA_PORTNO for replica" + echo "NOTE: using temporary directory $DATDIR for data, which will not be removed" + echo "NOTE: you are free to re-use this data directory at will" + echo + + exec postgres -p "$REPLICA_PORTNO" -D "$DATDIR" -k /tmp + ''; +} diff --git a/nix/packages/start-replica.sh.in b/nix/packages/start-replica.sh.in deleted file mode 100644 index e2096b17a..000000000 --- a/nix/packages/start-replica.sh.in +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -# shellcheck shell=bash - -[ ! -z "$DEBUG" ] && set -x - -# first argument should be '15' or '16' for the version -if [ "$1" == "15" ]; then - echo "Starting server for PSQL 15" - PSQL15=@PSQL15_BINDIR@ - BINDIR="$PSQL15" -elif [ "$1" == "16" ]; then - echo "Starting server for PSQL 16" - PSQL16=@PSQL16_BINDIR@ - BINDIR="$PSQL16" -elif [ "$1" == "orioledb-16" ]; then - echo "Starting server for PSQL ORIOLEDB 16" - PSQLORIOLEDB16=@PSQLORIOLEDB16_BINDIR@ - BINDIR="$PSQLORIOLEDB16" -else - echo "Please provide a valid Postgres version (15, 16 or orioledb-16)" - exit 1 -fi - -export PATH=$BINDIR/bin:$PATH - -PGSQL_SUPERUSER=@PGSQL_SUPERUSER@ -MASTER_PORTNO="$2" -REPLICA_PORTNO="$3" -REPLICA_SLOT="replica_$RANDOM" -DATDIR=$(mktemp -d) -mkdir -p "$DATDIR" - -echo "NOTE: runing pg_basebackup for server on port $MASTER_PORTNO" -echo "NOTE: using replica slot $REPLICA_SLOT" - -pg_basebackup -p "$MASTER_PORTNO" -h localhost -U "${PGSQL_SUPERUSER}" -X stream -C -S "$REPLICA_SLOT" -v -R -D "$DATDIR" - -echo "NOTE: using port $REPLICA_PORTNO for replica" -echo "NOTE: using temporary directory $DATDIR for data, which will not be removed" -echo "NOTE: you are free to re-use this data directory at will" -echo - -exec postgres -p "$REPLICA_PORTNO" -D "$DATDIR" -k /tmp diff --git a/nix/packages/sync-exts-versions.nix b/nix/packages/sync-exts-versions.nix index 02fa3deaa..c660a66c6 100644 --- a/nix/packages/sync-exts-versions.nix +++ b/nix/packages/sync-exts-versions.nix @@ -1,17 +1,17 @@ { - runCommand, + writeShellApplication, jq, yq, nix-editor, - nixVersions, + nix, }: -runCommand "sync-exts-versions" { } '' - mkdir -p $out/bin - substitute ${../tools/sync-exts-versions.sh.in} $out/bin/sync-exts-versions \ - --subst-var-by 'YQ' '${yq}/bin/yq' \ - --subst-var-by 'JQ' '${jq}/bin/jq' \ - --subst-var-by 'NIX_EDITOR' '${nix-editor.packages.nix-editor}/bin/nix-editor' \ - --subst-var-by 'NIXPREFETCHURL' '${nixVersions.nix_2_29}/bin/nix-prefetch-url' \ - --subst-var-by 'NIX' '${nixVersions.nix_2_29}/bin/nix' - chmod +x $out/bin/sync-exts-versions -'' +writeShellApplication { + name = "sync-exts-versions"; + runtimeInputs = [ + jq + yq + nix-editor.packages.nix-editor + nix + ]; + text = builtins.readFile ../tools/sync-exts-versions.sh.in; +} diff --git a/nix/tools/dbmate-tool.sh.in b/nix/tools/dbmate-tool.sh.in deleted file mode 100644 index ec38ecf1a..000000000 --- a/nix/tools/dbmate-tool.sh.in +++ /dev/null @@ -1,306 +0,0 @@ -#!/usr/bin/env bash -# shellcheck shell=bash - -[ ! -z "$DEBUG" ] && set -x - -# Default values -PSQL_VERSION="ALL" -PORTNO="@PGSQL_DEFAULT_PORT@" -PGSQL_SUPERUSER="@PGSQL_SUPERUSER@" -PGPASSWORD="${PGPASSWORD:-postgres}" -PGSQL_USER="postgres" -FLAKE_URL="github:supabase/postgres" -MIGRATIONS_DIR="@MIGRATIONS_DIR@" -CURRENT_SYSTEM="@CURRENT_SYSTEM@" -ANSIBLE_VARS="@ANSIBLE_VARS@" -PGBOUNCER_AUTH_SCHEMA_SQL=@PGBOUNCER_AUTH_SCHEMA_SQL@ -STAT_EXTENSION_SQL=@STAT_EXTENSION_SQL@ - -# Start PostgreSQL using nix -start_postgres() { - DATDIR=$(mktemp -d) - echo "Starting PostgreSQL in directory: $DATDIR" # Create the DATDIR if it doesn't exist - nix run "$FLAKE_URL#start-server" -- "$PSQL_VERSION" --skip-migrations --daemonize --datdir "$DATDIR" - echo "PostgreSQL started." -} - -# Cleanup function -cleanup() { - echo "Cleaning up..." - - # Check if PostgreSQL processes exist - if pgrep -f "postgres" >/dev/null; then - echo "Stopping PostgreSQL gracefully..." - - # Use pg_ctl to stop PostgreSQL - pg_ctl -D "$DATDIR" stop - - # Wait a bit for graceful shutdown - sleep 5 - - # Check if processes are still running - if pgrep -f "postgres" >/dev/null; then - echo "Warning: Some PostgreSQL processes could not be stopped gracefully." - fi - else - echo "PostgreSQL is not running, skipping stop." - fi - - # Always exit successfully, log any remaining processes - if pgrep -f "postgres" >/dev/null; then - echo "Warning: Some PostgreSQL processes could not be cleaned up:" - pgrep -f "postgres" - else - echo "Cleanup completed successfully" - fi -} - - -# Function to display help -print_help() { - echo "Usage: nix run .#dbmate-tool -- [options]" - echo - echo "Options:" - echo " -v, --version [15|17|orioledb-17|all] Specify the PostgreSQL version to use (required defaults to --version all)" - echo " -p, --port PORT Specify the port number to use (default: 5435)" - echo " -h, --help Show this help message" - echo " -f, --flake-url URL Specify the flake URL to use (default: github:supabase/postgres)" - echo "Description:" - echo " Runs 'dbmate up' against a locally running the version of database you specify. Or 'all' to run against all versions." - echo " NOTE: To create a migration, you must run 'nix develop' and then 'dbmate new ' to create a new migration file." - echo - echo "Examples:" - echo " nix run .#dbmate-tool" - echo " nix run .#dbmate-tool -- --version 15" - echo " nix run .#dbmate-tool -- --version 16 --port 5433" - echo " nix run .#dbmate-tool -- --version 16 --port 5433 --flake-url github:supabase/postgres/" -} - -# Parse arguments -while [[ "$#" -gt 0 ]]; do - case "$1" in - -v|--version) - if [[ -n "$2" && ! "$2" =~ ^- ]]; then - PSQL_VERSION="$2" - shift 2 - else - echo "Error: --version requires an argument (15, 16, or orioledb-17)" - exit 1 - fi - ;; - -u|--user) - if [[ -n "$2" && ! "$2" =~ ^- ]]; then - PGSQL_USER="$2" - shift 2 - else - echo "Error: --user requires an argument" - exit 1 - fi - ;; - -f|--flake-url) - if [[ -n "$2" && ! "$2" =~ ^- ]]; then - FLAKE_URL="$2" - shift 2 - else - echo "Error: --flake-url requires an argument" - exit 1 - fi - ;; - -p|--port) - if [[ -n "$2" && ! "$2" =~ ^- ]]; then - PORTNO="$2" - shift 2 - else - echo "Error: --port requires an argument" - exit 1 - fi - ;; - -h|--help) - print_help - exit 0 - ;; - *) - echo "Unknown option: $1" - print_help - exit 1 - ;; - esac -done - -# Function to wait for PostgreSQL to be ready -wait_for_postgres() { - local max_attempts=30 # Increased significantly - local attempt=1 - - # Give PostgreSQL a moment to actually start the process - sleep 2 - - while [ $attempt -le $max_attempts ]; do - "${PSQLBIN}/pg_isready" -h localhost -p "$PORTNO" -U "$PGSQL_SUPERUSER" -d postgres - local status=$? - - if [ $status -eq 0 ]; then - echo "PostgreSQL is ready!" - return 0 - fi - echo "Waiting for PostgreSQL to start (attempt $attempt/$max_attempts)..." - sleep 2 - attempt=$((attempt + 1)) - done - - echo "PostgreSQL failed to start after $max_attempts attempts" - return 1 -} - -check_orioledb_ready() { - local max_attempts=30 - local attempt=1 - - while [ $attempt -le $max_attempts ]; do - if "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres -c "SELECT * FROM pg_am WHERE amname = 'orioledb'" | grep -q orioledb; then - echo "Orioledb extension is ready!" - return 0 - fi - echo "Waiting for orioledb to be ready (attempt $attempt/$max_attempts)..." - sleep 2 - attempt=$((attempt + 1)) - done - - echo "Orioledb failed to initialize after $max_attempts attempts" - return 1 -} - -perform_dump() { - local max_attempts=3 - local attempt=1 - - while [ $attempt -le $max_attempts ]; do - echo "Attempting pg_dump (attempt $attempt/$max_attempts)" - - # Build the dump command - local dump_cmd="${PSQLBIN}/pg_dump -h localhost -p $PORTNO -U $PGSQL_SUPERUSER -d postgres --schema-only --no-owner --no-privileges" - - # Only use --restrict-key for standard PostgreSQL 15 and 17 versions - # OrioleDB doesn't support this flag yet - if [ "$PSQL_VERSION" = "15" ] || [ "$PSQL_VERSION" = "17" ] || [ "$PSQL_VERSION" = "orioledb-17" ]; then - # Use a fixed restrict key for reproducible test dumps - # This is safe in testing contexts but should not be used in production - dump_cmd="$dump_cmd --restrict-key=SupabaseTestDumpKey123" - echo "Using --restrict-key for reproducible dumps (PostgreSQL $PSQL_VERSION)" - else - echo "Skipping --restrict-key (version: $PSQL_VERSION)" - fi - - if $dump_cmd > "./db/schema.sql"; then - return 0 - fi - - echo "Dump attempt $attempt failed, waiting before retry..." - sleep 5 - attempt=$((attempt + 1)) - done - - echo "All dump attempts failed" - return 1 -} - -migrate_version() { - echo "PSQL_VERSION: $PSQL_VERSION" - #pkill -f "postgres" || true # Ensure PostgreSQL is stopped before starting - PSQLBIN=$(nix build --no-link "$FLAKE_URL#psql_$PSQL_VERSION/bin" --json | jq -r '.[].outputs.out + "/bin"') - echo "Using PostgreSQL version $PSQL_VERSION from $PSQLBIN" - - # Start PostgreSQL - start_postgres - echo "Waiting for PostgreSQL to be ready..." - - # Wait for PostgreSQL to be ready to accept connections - if ! wait_for_postgres; then - echo "Failed to connect to PostgreSQL server" - cleanup - exit 1 - fi - - if [ "$PSQL_VERSION" = "orioledb-17" ]; then - if ! check_orioledb_ready; then - echo "Failed to initialize orioledb extension" - exit 1 - fi - fi - - echo "PostgreSQL server is ready" - - # Configure PostgreSQL roles and permissions - if ! "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres <<-EOSQL -create role postgres superuser login password '$PGPASSWORD'; -alter database postgres owner to postgres; -EOSQL - then - echo "Failed to configure PostgreSQL roles and permissions" - exit 1 - fi - "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -d postgres -f "$PGBOUNCER_AUTH_SCHEMA_SQL" - "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -d postgres -f "$STAT_EXTENSION_SQL" - - # Set db url to run dbmate - export DATABASE_URL="postgres://$PGSQL_USER:$PGPASSWORD@localhost:$PORTNO/postgres?sslmode=disable" - # Export path so dbmate can find correct psql and pg_dump - export PATH="$PSQLBIN:$PATH" - # Run init scripts - if ! dbmate --migrations-dir "$MIGRATIONS_DIR/init-scripts" up; then - echo "Error: Initial migration failed" - exit 1 - fi - - # Password update command - if ! "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -c "ALTER USER supabase_admin WITH PASSWORD '$PGPASSWORD'"; then - echo "Error: Failed to update supabase_admin password" - exit 1 - fi - - # Set up database URL - export DATABASE_URL="postgres://$PGSQL_SUPERUSER:$PGPASSWORD@localhost:$PORTNO/postgres?sslmode=disable" - # Run migrations - if ! dbmate --migrations-dir "$MIGRATIONS_DIR/migrations" up; then - echo "Error: Final migration failed" - exit 1 - fi - - echo "Running dbmate dump with $PSQLBIN" - perform_dump - - echo "CURRENT_SYSTEM: $CURRENT_SYSTEM" - if [ -f "./db/schema.sql" ]; then - cp "./db/schema.sql" "./migrations/schema-$PSQL_VERSION.sql" - echo "Schema file moved to ./migrations/schema-$PSQL_VERSION.sql" - echo "PSQLBIN is $PSQLBIN" - else - echo "Warning: schema.sql file not found in ./db directory" - exit 1 - fi - - # If we get here, all commands succeeded - echo "PostgreSQL migration completed successfully" - echo "Check migrations are idempotent" - for sql in ./migrations/db/migrations/*.sql; do - echo "$0: running $sql" - "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres -f "$sql" || { - echo "Failed to execute $sql" - exit 1 - } - done -} - -if [ "$PSQL_VERSION" == "all" ]; then - VERSIONS=$(yq '.postgres_major[]' "$ANSIBLE_VARS" | tr -d '"') - echo "$VERSIONS" | while read -r version; do - PSQL_VERSION="$version" - echo "Migrating to PostgreSQL version $PSQL_VERSION" - migrate_version - cleanup - done -else - echo "Migrating to PostgreSQL version $PSQL_VERSION" - migrate_version - cleanup -fi diff --git a/nix/tools/migrate-tool.sh.in b/nix/tools/migrate-tool.sh.in deleted file mode 100644 index 10239ed80..000000000 --- a/nix/tools/migrate-tool.sh.in +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env bash - -[ ! -z "$DEBUG" ] && set -x - -# first argument is the old version; a path 15 or 16 -if [[ $1 == /nix/store* ]]; then - if [ ! -L "$1/receipt.json" ] || [ ! -e "$1/receipt.json" ]; then - echo "ERROR: $1 does not look like a valid Postgres install" - exit 1 - fi - OLDVER="$1" -elif [ "$1" == "15" ]; then - PSQL15=@PSQL15_BINDIR@ - OLDVER="$PSQL15" -elif [ "$1" == "16" ]; then - PSQL16=@PSQL16_BINDIR@ - OLDVER="$PSQL16" -else - echo "Please provide a valid Postgres version (15 or 16), or a /nix/store path" - exit 1 -fi - -# second argument is the new version; 15 or 16 -if [[ $2 == /nix/store* ]]; then - if [ ! -L "$2/receipt.json" ] || [ ! -e "$2/receipt.json" ]; then - echo "ERROR: $1 does not look like a valid Postgres install" - exit 1 - fi - NEWVER="$2" -elif [ "$2" == "15" ]; then - PSQL15=@PSQL15_BINDIR@ - NEWVER="$PSQL15" -elif [ "$2" == "16" ]; then - PSQL16=@PSQL16_BINDIR@ - NEWVER="$PSQL16" - echo "NEWVER IS $NEWVER" -else - echo "Please provide a valid Postgres version (15 or 16), or a /nix/store path" - exit 1 -fi - -# thid argument is the upgrade method: either pg_dumpall or pg_ugprade -if [ "$3" != "pg_dumpall" ] && [ "$3" != "pg_upgrade" ]; then - echo "Please provide a valid upgrade method (pg_dumpall or pg_upgrade)" - exit 1 -fi -UPGRADE_METHOD="$3" - -echo "Old server build: PSQL $1" -echo "New server build: PSQL $2" -echo "Upgrade method: $UPGRADE_METHOD" - -PORTNO="${2:-@PGSQL_DEFAULT_PORT@}" -DATDIR=$(mktemp -d) -NEWDAT=$(mktemp -d) -mkdir -p "$DATDIR" "$NEWDAT" - -echo "NOTE: using temporary directory $DATDIR for PSQL $1 data, which will not be removed" -echo "NOTE: you are free to re-use this data directory at will" -echo - -$OLDVER/bin/initdb -D "$DATDIR" --locale=C --username=supabase_admin -$NEWVER/bin/initdb -D "$NEWDAT" --locale=C --username=supabase_admin - -# NOTE (aseipp): we need to patch postgresql.conf to have the right pgsodium_getkey script -PSQL_CONF_FILE=@PSQL_CONF_FILE@ -PGSODIUM_GETKEY_SCRIPT=@PGSODIUM_GETKEY@ -echo "NOTE: patching postgresql.conf files" -for x in "$DATDIR" "$NEWDAT"; do - sed \ - "s#@PGSODIUM_GETKEY_SCRIPT@#$PGSODIUM_GETKEY_SCRIPT#g" \ - $PSQL_CONF_FILE > "$x/postgresql.conf" -done - -echo "NOTE: Starting first server (v${1}) to load data into the system" -$OLDVER/bin/pg_ctl start -D "$DATDIR" - -PRIMING_SCRIPT=@PRIMING_SCRIPT@ -MIGRATION_DATA=@MIGRATION_DATA@ - -$OLDVER/bin/psql -h localhost -d postgres -Xf "$PRIMING_SCRIPT" -$OLDVER/bin/psql -h localhost -d postgres -Xf "$MIGRATION_DATA" - -if [ "$UPGRADE_METHOD" == "pg_upgrade" ]; then - echo "NOTE: Stopping old server (v${1}) to prepare for migration" - $OLDVER/bin/pg_ctl stop -D "$DATDIR" - - echo "NOTE: Migrating old data $DATDIR to $NEWDAT using pg_upgrade" - - export PGDATAOLD="$DATDIR" - export PGDATANEW="$NEWDAT" - export PGBINOLD="$OLDVER/bin" - export PGBINNEW="$NEWVER/bin" - - if ! $NEWVER/bin/pg_upgrade --check; then - echo "ERROR: pg_upgrade check failed" - exit 1 - fi - - echo "NOTE: pg_upgrade check passed, proceeding with migration" - $NEWVER/bin/pg_upgrade - rm -f delete_old_cluster.sh # we don't need this - exit 0 -fi - -if [ "$UPGRADE_METHOD" == "pg_dumpall" ]; then - SQLDAT="$DATDIR/dump.sql" - echo "NOTE: Exporting data via pg_dumpall ($SQLDAT)" - $NEWVER/bin/pg_dumpall -h localhost > "$SQLDAT" - - echo "NOTE: Stopping old server (v${1}) to prepare for migration" - $OLDVER/bin/pg_ctl stop -D "$DATDIR" - - echo "NOTE: Starting second server (v${2}) to load data into the system" - $NEWVER/bin/pg_ctl start -D "$NEWDAT" - - echo "NOTE: Loading data into new server (v${2}) via 'cat | psql'" - cat "$SQLDAT" | $NEWVER/bin/psql -h localhost -d postgres - - printf "\n\n\n\n" - echo "NOTE: Done, check logs. Stopping the server; new database is located at $NEWDAT" - $NEWVER/bin/pg_ctl stop -D "$NEWDAT" -fi diff --git a/nix/tools/run-client.sh.in b/nix/tools/run-client.sh.in deleted file mode 100644 index 6acb4d6c0..000000000 --- a/nix/tools/run-client.sh.in +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -# shellcheck shell=bash - -[ ! -z "$DEBUG" ] && set -x - -# Default values -PSQL_VERSION="15" -PORTNO="@PGSQL_DEFAULT_PORT@" -PSQL_USER="postgres" - -# Function to display help -print_help() { - echo "Usage: nix run .#start-client -- [options]" - echo - echo "Options:" - echo " -v, --version [15|16|orioledb-16] Specify the PostgreSQL version to use (required)" - echo " -u, --user USER Specify the user/role to use (default: postgres)" - echo " -h, --help Show this help message" - echo - echo "Description:" - echo " Starts an interactive 'psql' session connecting to a Postgres database started with the" - echo " 'nix run .#start-server' command. If a migration file is not provided, the client" - echo " initializes the database with the default migrations for a new Supabase project." - echo " If a migrations file is provided, default migrations are skipped" - echo " If no migration file is provided, it runs the default Supabase migrations." - echo - echo "Examples:" - echo " nix run .#start-client" - echo " nix run .#start-client -- --version 15" - echo " nix run .#start-client -- --version 16 --port 5433" - echo " nix run .#start-client -- --version 16 --user supabase_admin" -} - -# Parse arguments -while [[ "$#" -gt 0 ]]; do - case "$1" in - -v|--version) - if [[ -n "$2" && ! "$2" =~ ^- ]]; then - PSQL_VERSION="$2" - shift 2 - else - echo "Error: --version requires an argument (15, 16, or orioledb-16)" - exit 1 - fi - ;; - -u|--user) - if [[ -n "$2" && ! "$2" =~ ^- ]]; then - PSQL_USER="$2" - shift 2 - else - echo "Error: --user requires an argument" - exit 1 - fi - ;; - -p|--port) - if [[ -n "$2" && ! "$2" =~ ^- ]]; then - PORTNO="$2" - shift 2 - else - echo "Error: --port requires an argument" - exit 1 - fi - ;; - -h|--help) - print_help - exit 0 - ;; - *) - echo "Unknown option: $1" - print_help - exit 1 - ;; - esac -done - -# Check if version is provided -if [[ -z "$PSQL_VERSION" ]]; then - echo "Error: PostgreSQL version is required." - print_help - exit 1 -fi - -# Determine PostgreSQL version -if [ "$PSQL_VERSION" == "15" ]; then - echo "Starting client for PSQL 15" - PSQL15=@PSQL15_BINDIR@ - BINDIR="$PSQL15" -elif [ "$PSQL_VERSION" == "17" ]; then - echo "Starting client for PSQL 17" - PSQL17=@PSQL17_BINDIR@ - BINDIR="$PSQL17" -elif [ "$PSQL_VERSION" == "orioledb-17" ]; then - echo "Starting client for PSQL ORIOLEDB 17" - PSQLORIOLEDB17=@PSQLORIOLEDB17_BINDIR@ - BINDIR="$PSQLORIOLEDB17" -else - echo "Please provide a valid Postgres version (15, 17, or orioledb-17)" - exit 1 -fi - -#vars for migration.sh -export PATH=$BINDIR/bin:$PATH -export POSTGRES_DB=postgres -export POSTGRES_HOST=localhost - -# Start interactive psql session -exec psql -U "$PSQL_USER" -p "$PORTNO" -h localhost postgres diff --git a/nix/tools/sync-exts-versions.sh.in b/nix/tools/sync-exts-versions.sh.in index 1b120e988..8e588b002 100644 --- a/nix/tools/sync-exts-versions.sh.in +++ b/nix/tools/sync-exts-versions.sh.in @@ -1,15 +1,9 @@ #!/usr/bin/env bash # shellcheck shell=bash -[ ! -z "$DEBUG" ] && set -x +[ -n "$DEBUG" ] && set -x -#pass in env vars supplied by nix -yq=@YQ@ -jq=@JQ@ -editor=@NIX_EDITOR@ -ansible_vars=$($yq '.' $PWD/ansible/vars.yml) -prefetchurl=@NIXPREFETCHURL@ -_nix=@NIX@ +ansible_vars=$(yq '.' "$PWD/ansible/vars.yml") fetch_source_url() { local source_url=${1//\"/} # Remove double quotes source_url=${source_url//\'/} # Remove single quotes @@ -21,11 +15,13 @@ fetch_source_url() { fi echo "$source_url" - + # Run nix-prefetch-url command - local initial_hash=$($prefetchurl --type sha256 "$source_url" --unpack | cut -d ' ' -f 2) + local initial_hash + initial_hash=$(nix-prefetch-url --type sha256 "$source_url" --unpack | cut -d ' ' -f 2) #once we can bump up nix version, we can use nix hash convert --hash-algo sha256 - local final_hash=$($_nix hash to-sri --type sha256 $initial_hash) + local final_hash + final_hash=$(nix hash to-sri --type sha256 "$initial_hash") echo "$final_hash" } @@ -37,19 +33,19 @@ sync_version() { # Update the version and hash in the Nix expression - $editor $PWD/nix/ext/$package_name.nix version --inplace -v "$version" - $editor $PWD/nix/ext/$package_name.nix src.hash --inplace -v $hash + nix-editor "$PWD/nix/ext/$package_name.nix" version --inplace -v "$version" + nix-editor "$PWD/nix/ext/$package_name.nix" src.hash --inplace -v "$hash" } run_sync() { local varname=$1 local package_name=$2 - version=$(echo $ansible_vars | $jq -r '.'$varname'') + version=$(echo "$ansible_vars" | jq -r ".$varname") echo "$key: $version" - url=$($_nix eval .#psql_15/exts/$package_name.src.url) - hash=$(fetch_source_url $url | tail -n 1) - $(sync_version $package_name $version $hash) + url=$(nix eval ".#psql_15/exts/$package_name.src.url") + hash=$(fetch_source_url "$url" | tail -n 1) + sync_version "$package_name" "$version" "$hash" echo "synced $package_name to version $version with hash $hash" @@ -68,11 +64,13 @@ fetchurl_source_url() { fi echo "$source_url" - + # Run nix-prefetch-url command - local initial_hash=$($prefetchurl --type sha256 "$source_url" | cut -d ' ' -f 2) + local initial_hash + initial_hash=$(nix-prefetch-url --type sha256 "$source_url" | cut -d ' ' -f 2) #once we can bump up nix version, we can use nix hash convert --hash-algo sha256 - local final_hash=$($_nix hash to-sri --type sha256 $initial_hash) + local final_hash + final_hash=$(nix hash to-sri --type sha256 "$initial_hash") echo "$final_hash" } @@ -84,8 +82,8 @@ sync_version_fetchurl() { # Update the version and hash in the Nix expression - $editor $PWD/nix/ext/$package_name.nix version --inplace -v "$version" - $editor $PWD/nix/ext/$package_name.nix src.sha256 --inplace -v $hash + nix-editor "$PWD/nix/ext/$package_name.nix" version --inplace -v "$version" + nix-editor "$PWD/nix/ext/$package_name.nix" src.sha256 --inplace -v "$hash" } @@ -93,11 +91,11 @@ run_sync_fetchurl() { local varname=$1 local package_name=$2 - version=$(echo $ansible_vars | $jq -r '.'$varname'') + version=$(echo "$ansible_vars" | jq -r ".$varname") echo "$key: $version" - url=$($_nix eval .#psql_15/exts/$package_name.src.url) - hash=$(fetchurl_source_url $url | tail -n 1) - $(sync_version_fetchurl $package_name $version $hash) + url=$(nix eval ".#psql_15/exts/$package_name.src.url") + hash=$(fetchurl_source_url "$url" | tail -n 1) + sync_version_fetchurl "$package_name" "$version" "$hash" echo "synced $package_name to version $version with hash $hash" @@ -106,16 +104,13 @@ run_sync_fetchurl() { #for use on derivations that use cargoHash update_cargo_vendor_hash() { local package_name=$1 - $editor $PWD/nix/ext/$package_name.nix cargoHash --inplace -v "" - output=$($_nix build .#psql_15/exts/$package_name 2>&1) - - # Check if the command exited with an error - if [ $? -ne 0 ]; then + nix-editor "$PWD/nix/ext/$package_name.nix" cargoHash --inplace -v "" + if ! output=$(nix build .#psql_15/exts/"$package_name" 2>&1); then # Extract the hash value after "got: " hash_value_scraped=$(echo "$output" | grep "got:" | awk '{for (i=1; i<=NF; i++) if ($i ~ /^sha/) print $i}') hash_value="\"$hash_value_scraped\"" # Continue using the captured hash value - $editor $PWD/nix/ext/$package_name.nix cargoHash --inplace -v $hash_value + nix-editor "$PWD/nix/ext/$package_name.nix" cargoHash --inplace -v "$hash_value" echo "Updated cargoHash for $package_name to $hash_value" else echo "$package_name builds successfully, moving on..." @@ -124,146 +119,146 @@ update_cargo_vendor_hash() { #iterate values in ansible vars, case statement # to match ansible var to package name -keys=$(echo "$ansible_vars" | $jq -r 'keys[]') +keys=$(echo "$ansible_vars" | jq -r 'keys[]') for key in $keys; do case $key in "pg_hashids_release") varname="pg_hashids_release" package_name="pg_hashids" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "hypopg_release") varname="hypopg_release" package_name="hypopg" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pg_graphql_release") varname="pg_graphql_release" package_name="pg_graphql" - run_sync $varname $package_name - update_cargo_vendor_hash $package_name + run_sync "$varname" "$package_name" + update_cargo_vendor_hash "$package_name" ;; "pg_cron_release") varname="pg_cron_release" package_name="pg_cron" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pgsql_http_release") varname="pgsql_http_release" package_name="pgsql-http" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pg_jsonschema_release") varname="pg_jsonschema_release" package_name="pg_jsonschema" - run_sync $varname $package_name - update_cargo_vendor_hash $package_name + run_sync "$varname" "$package_name" + update_cargo_vendor_hash "$package_name" ;; "pg_net_release") varname="pg_net_release" package_name="pg_net" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pg_plan_filter_release") varname="pg_plan_filter_release" package_name="pg_plan_filter" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pg_safeupdate_release") varname="pg_safeupdate_release" package_name="pg-safeupdate" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pgsodium_release") varname="pgsodium_release" package_name="pgsodium" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pg_repack_release") varname="pg_repack_release" package_name="pg_repack" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pgrouting_release") varname="pgrouting_release" package_name="pgrouting" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "ptap_release") varname="pgtap_release" package_name="pgtap" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pg_stat_monitor_release") varname="pg_stat_monitor_release" package_name="pg_stat_monitor" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pg_tle_release") varname="pg_tle_release" package_name="pg_tle" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pgaudit_release") varname="pgaudit_release" package_name="pgaudit" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "plpgsql_check_release") varname="plpgsql_check_release" package_name="plpgsql-check" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pgvector_release") varname="pgvector_release" package_name="pgvector" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "pgjwt_release") varname="pgjwt_release" package_name="pgjwt" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "plv8_release") varname="plv8_release" package_name="plv8" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "postgis_release") varname="postgis_release" package_name="postgis" - run_sync_fetchurl $varname $package_name + run_sync_fetchurl "$varname" "$package_name" ;; "pgroonga_release") varname="pgroonga_release" package_name="pgroonga" - run_sync_fetchurl $varname $package_name + run_sync_fetchurl "$varname" "$package_name" ;; "rum_release") varname="rum_release" package_name="rum" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "timescaledb_release") varname="timescaledb_release" package_name="timescaledb" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "supautils_release") varname="supautils_release" package_name="supautils" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "vault_release") varname="vault_release" package_name="vault" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; "wal2json_release") varname="wal2json_release" package_name="wal2json" - run_sync $varname $package_name + run_sync "$varname" "$package_name" ;; *) ;; From 2188ce0dea4a28c977636751eddf325b69b6a052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Thu, 11 Dec 2025 22:17:58 +0100 Subject: [PATCH 52/52] chore: use packer from nixpkgs We don't need to maintain our own packer package anymore since we are using a recently updated nixpkgs that includes packer. --- nix/checks.nix | 2 -- nix/packages/default.nix | 3 +-- nix/packages/packer.nix | 43 ---------------------------------------- 3 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 nix/packages/packer.nix diff --git a/nix/checks.nix b/nix/checks.nix index 193e2a0f3..81c3a20ed 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -389,8 +389,6 @@ ); inherit (self'.packages) wal-g-2 - dbmate-tool - packer pg_regress ; devShell = self'.devShells.default; diff --git a/nix/packages/default.nix b/nix/packages/default.nix index bb4883099..9ae7f1531 100644 --- a/nix/packages/default.nix +++ b/nix/packages/default.nix @@ -29,7 +29,7 @@ { packages = ( { - build-ami = pkgs.callPackage ./build-ami.nix { packer = self'.packages.packer; }; + build-ami = pkgs.callPackage ./build-ami.nix { }; build-test-ami = pkgs.callPackage ./build-test-ami.nix { }; cleanup-ami = pkgs.callPackage ./cleanup-ami.nix { }; dbmate-tool = pkgs.callPackage ./dbmate-tool.nix { inherit (self.supabase) defaults; }; @@ -43,7 +43,6 @@ mecab-naist-jdic = pkgs.callPackage ./mecab-naist-jdic.nix { }; migrate-tool = pkgs.callPackage ./migrate-tool.nix { psql_15 = self'.packages."psql_15/bin"; }; overlayfs-on-package = pkgs.callPackage ./overlayfs-on-package.nix { }; - packer = pkgs.callPackage ./packer.nix { inherit inputs; }; pg-backrest = inputs.nixpkgs.legacyPackages.${pkgs.system}.pgbackrest; pg-restore = pkgs.callPackage ./pg-restore.nix { psql_15 = self'.packages."psql_15/bin"; }; pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP; diff --git a/nix/packages/packer.nix b/nix/packages/packer.nix deleted file mode 100644 index aa0d797c9..000000000 --- a/nix/packages/packer.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - pkgs, - lib, - fetchFromGitHub, - installShellFiles, - ... -}: -let - buildGoModule = pkgs.buildGoModule; -in -buildGoModule rec { - pname = "packer"; - version = "1.14.1"; - - src = fetchFromGitHub { - owner = "hashicorp"; - repo = "packer"; - rev = "v${version}"; - hash = "sha256-3g9hsmrfLzGhjcGvUza/L9PMGUFw+KLbg2pIK0CxlQI="; - }; - - vendorHash = "sha256-F6hn+pXPyPe70UTK8EF24lk7ArYz7ygUyVVsatW6+hI="; - - subPackages = [ "." ]; - - ldflags = [ - "-s" - "-w" - ]; - - nativeBuildInputs = [ installShellFiles ]; - - postInstall = '' - installShellCompletion --zsh contrib/zsh-completion/_packer - ''; - - meta = { - description = "Tool for creating identical machine images for multiple platforms from a single source configuration"; - homepage = "https://www.packer.io"; - license = lib.licenses.bsl11; - changelog = "https://github.com/hashicorp/packer/blob/v${version}/CHANGELOG.md"; - }; -}