Skip to content

Commit 2e2fab6

Browse files
committed
fix: use postgis_extension_AddToSearchPath for extensions schema
1 parent 7ef2e77 commit 2e2fab6

File tree

4 files changed

+5
-38
lines changed

4 files changed

+5
-38
lines changed

ansible/vars.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ postgres_major:
88

99
# Full version strings for each major version
1010
postgres_release:
11-
postgresorioledb-17: "17.0.1.019-orioledb-staging-1"
12-
postgres15: "15.8.1.029-staging-1"
11+
postgresorioledb-17: "17.0.1.019-orioledb-staging-2"
12+
postgres15: "15.8.1.029-staging-2"
1313

1414
# Non Postgres Extensions
1515
pgbouncer_release: "1.19.0"

nix/ext/postgis.nix

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ stdenv.mkDerivation rec {
3535
nativeBuildInputs = [ perl pkg-config ];
3636
dontDisableStatic = true;
3737

38-
# Copy our SQL file into the source
39-
postUnpack = ''
40-
cp ${./tiger_search_path.sql} $sourceRoot/tiger_search_path.sql
41-
'';
42-
4338
env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib";
4439

4540
preConfigure = ''
@@ -63,25 +58,17 @@ stdenv.mkDerivation rec {
6358

6459
postInstall = ''
6560
rm $out/bin/postgres
66-
6761
for prog in $out/bin/*; do # */
6862
ln -s $prog $prog-${version}
6963
done
70-
71-
# Add AddToSearchPath function to tiger_geocoder files
64+
# Add function definition and usage to tiger geocoder files
7265
for file in $out/share/postgresql/extension/postgis_tiger_geocoder*--${version}.sql; do
73-
# Insert the function near the start of the file
74-
sed -i '/Copyright (C) 2010, 2011-2015 Regina Obe and Leo Hsu/r tiger_search_path.sql' "$file"
75-
76-
# Add the call to AddToSearchPath just before the install_geocode_settings function
77-
#sed -i '/CREATE FUNCTION install_geocode_settings()/i SELECT tiger.AddToSearchPath('"'"'extensions'"'"');' "$file"
66+
sed -i '/SELECT postgis_extension_AddToSearchPath('tiger');/a SELECT postgis_extension_AddToSearchPath('extensions');' "$file"
7867
done
79-
8068
# Original topology patching
8169
for file in $out/share/postgresql/extension/postgis_topology*--${version}.sql; do
8270
sed -i "/SELECT topology.AddToSearchPath('topology');/i SELECT topology.AddToSearchPath('extensions');" "$file"
8371
done
84-
8572
mkdir -p $doc/share/doc/postgis
8673
mv doc/* $doc/share/doc/postgis/
8774
'';

nix/ext/tiger_search_path.sql

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)