diff -Nurd postgis-1.5.2/README.postgis postgis-1.5.2-new/README.postgis --- postgis-1.5.2/README.postgis 2010-09-27 11:16:58.000000000 -0400 +++ postgis-1.5.2-new/README.postgis 2010-12-29 09:59:20.000000000 -0500 @@ -146,8 +146,8 @@ So, as postgres run: - createlang plpgsql - psql -f postgis/postgis.sql -d + createlang-@FINKPGRAWVERSION@ plpgsql + psql-@FINKPGRAWVERSION@ -f postgis/postgis.sql -d Your database should now be spatially enabled. @@ -197,7 +197,7 @@ # Create a "custom-format" dump of the database you want # to upgrade (let's call it "olddb") - $ pg_dump -Fc olddb olddb.dump + $ pg_dump-@FINKPGRAWVERSION@ -Fc olddb olddb.dump # Restore the dump while upgrading postgis into # a new database. @@ -214,9 +214,9 @@ # drop the attrelid, varattnum and stats columns in the geometry_columns # table, which are no-more needed. Keeping them won't hurt. # !!! DROPPING THEM WHEN REALLY NEEDED WILL DO HARM !!!! - $ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid" - $ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum" - $ psql newdb -c "ALTER TABLE geometry_columns DROP stats" + $ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP attrelid" + $ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP varattnum" + $ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP stats" # The spatial_ref_sys table is restored from the dump, to # ensure your custom additions are kept, but the distributed @@ -224,7 +224,7 @@ # entries, drop the table and source the new one. # If you did make additions we assume you know how to backup them before # upgrading the table. Replace it with the new like this: - $ psql newdb + $ psql-@FINKPGRAWVERSION@ newdb newdb=> DELETE FROM spatial_ref_sys; DROP newdb=> \i spatial_ref_sys.sql diff -Nurd postgis-1.5.2/doc/geography.txt postgis-1.5.2-new/doc/geography.txt --- postgis-1.5.2/doc/geography.txt 2009-09-14 06:54:33.000000000 -0400 +++ postgis-1.5.2-new/doc/geography.txt 2010-12-29 09:59:20.000000000 -0500 @@ -56,13 +56,13 @@ * Then, create a database and install PostGIS into that database. (Assuming your PostgreSQL is installed in /usr/local/pgsql.) - createdb geography - psql geography < /usr/local/pgsql/share/contrib/postgis.sql - psql geography < /usr/local/pgsql/share/contrib/spatial_ref_sys + createdb-@FINKPGRAWVERSION@ geography + psql-@FINKPGRAWVERSION@ geography < /usr/local/pgsql/share/contrib/postgis.sql + psql-@FINKPGRAWVERSION@ geography < /usr/local/pgsql/share/contrib/spatial_ref_sys * Then, install the geography extension. - psql geography < /usr/local/pgsql/share/contrib/geography.sql + psql-@FINKPGRAWVERSION@ geography < /usr/local/pgsql/share/contrib/geography.sql * That's it! diff -Nurd postgis-1.5.2/doc/html/postgis.html postgis-1.5.2-new/doc/html/postgis.html --- postgis-1.5.2/doc/html/postgis.html 2010-09-27 11:21:00.000000000 -0400 +++ postgis-1.5.2-new/doc/html/postgis.html 2010-12-29 10:01:10.000000000 -0500 @@ -55,11 +55,11 @@ cd doc/ make comments-install #END OPTIONAL -createdb yourdatabase -createlang plpgsql yourdatabase -psql -d yourdatabase -f postgis.sql -psql -d yourdatabase -f postgis_comments.sql -psql -d yourdatabase -f spatial_ref_sys.sql
[Note]

+createdb-@FINKPGRAWVERSION@ yourdatabase +createlang-@FINKPGRAWVERSION@ plpgsql yourdatabase +psql-@FINKPGRAWVERSION@ -d yourdatabase -f postgis.sql +psql-@FINKPGRAWVERSION@ -d yourdatabase -f postgis_comments.sql +psql-@FINKPGRAWVERSION@ -d yourdatabase -f spatial_ref_sys.sql

[Note]

NOTE: The postgis.sql and spatial_ref_sys.sql will be installed in the /share/contrib/postgis-1.5 of your PostGIS install. If you didn't install the OPTIONAL comments section, you will need to manually copy the @@ -423,35 +423,35 @@ The first step in creating a PostGIS database is to create a simple PostgreSQL database.

- createdb [yourdatabase] + createdb-@FINKPGRAWVERSION@ [yourdatabase]

Many of the PostGIS functions are written in the PL/pgSQL procedural language. As such, the next step to create a PostGIS database is to enable the PL/pgSQL language in your new database. This is accomplish by the command

- createlang plpgsql [yourdatabase] + createlang-@FINKPGRAWVERSION@ plpgsql [yourdatabase]

Now load the PostGIS object and function definitions into your database by loading the postgis.sql definitions file (located in [prefix]/share/contrib as specified during the configuration step).

- psql -d [yourdatabase] -f postgis.sql + psql-@FINKPGRAWVERSION@ -d [yourdatabase] -f postgis.sql

For a complete set of EPSG coordinate system definition identifiers, you can also load the spatial_ref_sys.sql definitions file and populate the spatial_ref_sys table. This will permit you to perform ST_Transform() operations on geometries.

- psql -d [yourdatabase] -f spatial_ref_sys.sql + psql-@FINKPGRAWVERSION@ -d [yourdatabase] -f spatial_ref_sys.sql

If you wish to add comments to the PostGIS functions, the final step is to load the postgis_comments.sql into your spatial database. The comments can be viewed by simply typing \dd - [function_name] from a psql terminal window. + [function_name] from a psql-@FINKPGRAWVERSION@ terminal window.

- psql -d [yourdatabase] -f postgis_comments.sql + psql-@FINKPGRAWVERSION@ -d [yourdatabase] -f postgis_comments.sql

2.6. Create a spatially-enabled database from a template

Some packaged distributions of PostGIS (in particular the Win32 installers for PostGIS >= 1.1.5) load the PostGIS functions into a template @@ -463,7 +463,7 @@ new databases.

From the shell: -

# createdb -T template_postgis my_spatial_db

+

# createdb-@FINKPGRAWVERSION@ -T template_postgis my_spatial_db

From SQL:

postgres=# CREATE DATABASE my_spatial_db TEMPLATE=template_postgis

2.7. Upgrading

Upgrading existing spatial databases can be tricky as it requires @@ -482,7 +482,7 @@ After compiling you should find several postgis_upgrade*.sql files. Install the one for your version of PostGIS. For example postgis_upgrade_13_to_15.sql should be used if you are upgrading from postgis 1.3 to 1.5. -

$ psql -f postgis_upgrade_13_to_15.sql -d your_spatial_database

+

$ psql-@FINKPGRAWVERSION@ -f postgis_upgrade_13_to_15.sql -d your_spatial_database

If a soft upgrade is not possible the script will abort and you will be warned about HARD UPGRADE being required, so do not hesitate to try a soft upgrade first. @@ -506,7 +506,7 @@ call it "olddb")

$ pg_dump -Fc olddb > olddb.dump

Restore the dump contextually upgrading postgis into a new database. The - new database doesn't have to exist. postgis_restore accepts createdb + new database doesn't have to exist. postgis_restore accepts createdb-@FINKPGRAWVERSION@ parameters after the dump file name, and that can for instance be used if you are using a non-default character encoding for your database. Let's call it "newdb", with UNICODE as the character encoding: @@ -518,16 +518,16 @@ drop the attrelid, varattnum and stats columns in the geometry_columns table, which are no-more needed. Keeping them won't hurt. DROPPING THEM WHEN REALLY NEEDED WILL DO HURT ! -

$ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid"
-$ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum"
-$ psql newdb -c "ALTER TABLE geometry_columns DROP stats"

+

$ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP attrelid"
+$ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP varattnum"
+$ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP stats"

spatial_ref_sys table is restore from the dump, to ensure your custom additions are kept, but the distributed one might contain modification so you should backup your entries, drop the table and source the new one. If you did make additions we assume you know how to backup them before upgrading the table. Replace of it with the new one is done like this: -

$ psql newdb
+	  

$ psql-@FINKPGRAWVERSION@ newdb
 newdb=> truncate spatial_ref_sys;
 TRUNCATE
 newdb=> \i spatial_ref_sys.sql

2.8. Common Problems

@@ -542,7 +542,7 @@ will only work with PostgreSQL 8.1 or newer, and strange, unexpected error messages will result if you use an older version. To check the version of PostgreSQL which is running, connect to the database using - psql and run this query: + psql-@FINKPGRAWVERSION@ and run this query:

SELECT version();

If you are running an RPM based distribution, you can check for the existence of pre-installed packages using the rpm @@ -617,7 +617,7 @@ Storing geography type data is a little different than storing geometry. Refer to Section 4.2.1, “Geography Basics” for details on storing geography.

For geometry: Connect to your database with - psql and try the following SQL:

CREATE TABLE gtest ( ID int4, NAME varchar(20) );
+        psql-@FINKPGRAWVERSION@ and try the following SQL:

CREATE TABLE gtest ( ID int4, NAME varchar(20) );
 SELECT AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2);

If the geometry column addition fails, you probably have not loaded the PostGIS functions and objects into this database. See the Section 2.4, “Installation”.

Then, you can insert a geometry into the table using a SQL @@ -1237,7 +1237,7 @@ INSERT INTO roads (road_id, roads_geom, road_name) VALUES (6,ST_GeomFromText('LINESTRING(198231 263418,198213 268322)',-1),'Dave Cres'); COMMIT;

The data file can be piped into PostgreSQL very easily using the - "psql" SQL terminal monitor:

psql -d [database] -f roads.sql

4.4.2. Using the Loader

+ "psql-@FINKPGRAWVERSION@" SQL terminal monitor:

psql-@FINKPGRAWVERSION@ -d [database] -f roads.sql

4.4.2. Using the Loader

The shp2pgsql data loader converts ESRI Shape files into SQL suitable for insertion into a PostGIS/PostgreSQL database either in geometry or geography format. The loader has several operating modes distinguished by command line flags: @@ -1295,9 +1295,9 @@ An example session using the loader to create an input file and uploading it might look like this:

# shp2pgsql -c -D -s 4269 -i -I shaperoads.shp myschema.roadstable > roads.sql
-# psql -d roadsdb -f roads.sql

+# psql-@FINKPGRAWVERSION@ -d roadsdb -f roads.sql

A conversion and upload can be done all in one step using UNIX pipes: -

# shp2pgsql shaperoads.shp myschema.roadstable | psql -d roadsdb

4.5. Retrieving GIS Data

Data can be extracted from the database using either SQL or the +

# shp2pgsql shaperoads.shp myschema.roadstable | psql-@FINKPGRAWVERSION@ -d roadsdb

4.5. Retrieving GIS Data

Data can be extracted from the database using either SQL or the Shape file loader/dumper. In the section on SQL we will discuss some of the operators available to do comparisons and queries on spatial tables.

4.5.1. Using SQL

The most straightforward means of pulling data out of the database @@ -7906,7 +7906,7 @@ CXXFLAGS)

Improvements

New index creation capabilities in loader (-I switch)

Initial support for postgresql 8.1dev

A.26. Release 1.0.1

Release date: 2005/05/24

Contains a few bug fixes and some improvements.

Upgrading

If you are upgrading from release 1.0.0RC6 or up you DO NOT need a dump/reload.

Upgrading from older releases requires a dump/reload. See the upgrading chapter for more - informations.

Library changes

BUGFIX in 3d computation of length_spheroid()

BUGFIX in join selectivity estimator

Other changes/additions

BUGFIX in shp2pgsql escape functions

better support for concurrent postgis in multiple schemas

documentation fixes

jdbc2: compile with "-target 1.2 -source 1.2" by default

NEW -k switch for pgsql2shp

NEW support for custom createdb options in + informations.

Library changes

BUGFIX in 3d computation of length_spheroid()

BUGFIX in join selectivity estimator

Other changes/additions

BUGFIX in shp2pgsql escape functions

better support for concurrent postgis in multiple schemas

documentation fixes

jdbc2: compile with "-target 1.2 -source 1.2" by default

NEW -k switch for pgsql2shp

NEW support for custom createdb-@FINKPGRAWVERSION@ options in postgis_restore.pl

BUGFIX in pgsql2shp attribute names unicity enforcement

BUGFIX in Paris projections definitions

postgis_restore.pl cleanups

A.27. Release 1.0.0

Release date: 2005/04/19

Final 1.0.0 release. Contains a few bug fixes, some improvements in the loader (most notably support for older postgis versions), and more docs.

Upgrading

If you are upgrading from release 1.0.0RC6 you DO diff -Nurd postgis-1.5.2/doc/installation.xml postgis-1.5.2-new/doc/installation.xml --- postgis-1.5.2/doc/installation.xml 2010-09-27 09:24:20.000000000 -0400 +++ postgis-1.5.2-new/doc/installation.xml 2010-12-29 10:01:58.000000000 -0500 @@ -19,11 +19,11 @@ cd doc/ make comments-install #END OPTIONAL -createdb yourdatabase -createlang plpgsql yourdatabase -psql -d yourdatabase -f postgis.sql -psql -d yourdatabase -f postgis_comments.sql -psql -d yourdatabase -f spatial_ref_sys.sql +createdb-@FINKPGRAWVERSION@ yourdatabase +createlang-@FINKPGRAWVERSION@ plpgsql yourdatabase +psql-@FINKPGRAWVERSION@ -d yourdatabase -f postgis.sql +psql-@FINKPGRAWVERSION@ -d yourdatabase -f postgis_comments.sql +psql-@FINKPGRAWVERSION@ -d yourdatabase -f spatial_ref_sys.sql @@ -626,7 +626,7 @@ - createdb [yourdatabase] + createdb-@FINKPGRAWVERSION@ [yourdatabase] @@ -637,7 +637,7 @@ - createlang plpgsql [yourdatabase] + createlang-@FINKPGRAWVERSION@ plpgsql [yourdatabase] @@ -648,7 +648,7 @@ - psql -d [yourdatabase] -f postgis.sql + psql-@FINKPGRAWVERSION@ -d [yourdatabase] -f postgis.sql @@ -659,18 +659,18 @@ - psql -d [yourdatabase] -f spatial_ref_sys.sql + psql-@FINKPGRAWVERSION@ -d [yourdatabase] -f spatial_ref_sys.sql If you wish to add comments to the PostGIS functions, the final step is to load the postgis_comments.sql into your spatial database. The comments can be viewed by simply typing \dd - [function_name] from a psql terminal window. + [function_name] from a psql-@FINKPGRAWVERSION@ terminal window. - psql -d [yourdatabase] -f postgis_comments.sql + psql-@FINKPGRAWVERSION@ -d [yourdatabase] -f postgis_comments.sql @@ -692,7 +692,7 @@ From the shell: - # createdb -T template_postgis my_spatial_db + # createdb-@FINKPGRAWVERSION@ -T template_postgis my_spatial_db From SQL: @@ -734,7 +734,7 @@ from postgis 1.3 to 1.5. - $ psql -f postgis_upgrade_13_to_15.sql -d your_spatial_database + $ psql-@FINKPGRAWVERSION@ -f postgis_upgrade_13_to_15.sql -d your_spatial_database If a soft upgrade is not possible the script will abort and you will be @@ -780,7 +780,7 @@ Restore the dump contextually upgrading postgis into a new database. The - new database doesn't have to exist. postgis_restore accepts createdb + new database doesn't have to exist. postgis_restore accepts createdb-@FINKPGRAWVERSION@ parameters after the dump file name, and that can for instance be used if you are using a non-default character encoding for your database. Let's call it "newdb", with UNICODE as the character encoding: @@ -802,9 +802,9 @@ WHEN REALLY NEEDED WILL DO HURT ! - $ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid" -$ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum" -$ psql newdb -c "ALTER TABLE geometry_columns DROP stats" + $ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP attrelid" +$ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP varattnum" +$ psql-@FINKPGRAWVERSION@ newdb -c "ALTER TABLE geometry_columns DROP stats" spatial_ref_sys table is restore from the dump, to ensure your custom @@ -815,7 +815,7 @@ this: - $ psql newdb + $ psql-@FINKPGRAWVERSION@ newdb newdb=> truncate spatial_ref_sys; TRUNCATE newdb=> \i spatial_ref_sys.sql @@ -841,7 +841,7 @@ will only work with PostgreSQL 8.1 or newer, and strange, unexpected error messages will result if you use an older version. To check the version of PostgreSQL which is running, connect to the database using - psql and run this query: + psql-@FINKPGRAWVERSION@ and run this query: SELECT version(); diff -Nurd postgis-1.5.2/doc/man/shp2pgsql.1 postgis-1.5.2-new/doc/man/shp2pgsql.1 --- postgis-1.5.2/doc/man/shp2pgsql.1 2006-10-14 10:22:10.000000000 -0400 +++ postgis-1.5.2-new/doc/man/shp2pgsql.1 2010-12-29 09:59:20.000000000 -0500 @@ -106,11 +106,11 @@ # \fBshp2pgsql shaperoads roadstable roadsdb > roads.sql\fR .br -# \fBpsql \-d roadsdb \-f roads.sql\fR +# \fBpsql-@FINKPGRAWVERSION@ \-d roadsdb \-f roads.sql\fR A conversion and upload can be done all in one step using UNIX pipes: -# \fBshp2pgsql shaperoads roadstable roadsdb | psql \-d roadsdb\fR +# \fBshp2pgsql shaperoads roadstable roadsdb | psql-@FINKPGRAWVERSION@ \-d roadsdb\fR .SH "AUTHORS" .LP diff -Nurd postgis-1.5.2/doc/using_postgis_dataman.xml postgis-1.5.2-new/doc/using_postgis_dataman.xml --- postgis-1.5.2/doc/using_postgis_dataman.xml 2010-03-08 12:03:59.000000000 -0500 +++ postgis-1.5.2-new/doc/using_postgis_dataman.xml 2010-12-29 09:59:20.000000000 -0500 @@ -1616,7 +1616,7 @@ The data file can be piped into PostgreSQL very easily using the "psql" SQL terminal monitor: - psql -d [database] -f roads.sql + psql-@FINKPGRAWVERSION@ -d [database] -f roads.sql @@ -1798,13 +1798,13 @@ # shp2pgsql -c -D -s 4269 -i -I shaperoads.shp myschema.roadstable > roads.sql -# psql -d roadsdb -f roads.sql +# psql-@FINKPGRAWVERSION@ -d roadsdb -f roads.sql A conversion and upload can be done all in one step using UNIX pipes: - # shp2pgsql shaperoads.shp myschema.roadstable | psql -d roadsdb + # shp2pgsql shaperoads.shp myschema.roadstable | psql-@FINKPGRAWVERSION@ -d roadsdb diff -Nurd postgis-1.5.2/extras/ogc_test_suite/Makefile postgis-1.5.2-new/extras/ogc_test_suite/Makefile --- postgis-1.5.2/extras/ogc_test_suite/Makefile 2009-01-15 13:35:06.000000000 -0500 +++ postgis-1.5.2-new/extras/ogc_test_suite/Makefile 2010-12-29 09:59:20.000000000 -0500 @@ -1,15 +1,15 @@ TESTDB=ogc_test_suite all: - createdb $(TESTDB) > /dev/null + createdb-@FINKPGRAWVERSION@ $(TESTDB) > /dev/null createlang plpgsql $(TESTDB) - psql $(TESTDB) < ../../postgis.sql >/dev/null 2>&1 - psql -a -f 1_schema.sql $(TESTDB) > 1_output.txt 2>&1 - psql -a -f 2_queries.sql $(TESTDB) > 2_output.txt 2>&1 + psql-@FINKPGRAWVERSION@ $(TESTDB) < ../../postgis.sql >/dev/null 2>&1 + psql-@FINKPGRAWVERSION@ -a -f 1_schema.sql $(TESTDB) > 1_output.txt 2>&1 + psql-@FINKPGRAWVERSION@ -a -f 2_queries.sql $(TESTDB) > 2_output.txt 2>&1 @echo "---------------------------------------" @echo "---* Check results in 2_output.txt *---" @echo "---------------------------------------" clean: - dropdb $(TESTDB) + dropdb-@FINKPGRAWVERSION@ $(TESTDB) rm -f 1_output.txt rm -f 2_output.txt diff -Nurd postgis-1.5.2/extras/ogc_test_suite/README postgis-1.5.2-new/extras/ogc_test_suite/README --- postgis-1.5.2/extras/ogc_test_suite/README 2009-01-15 13:35:06.000000000 -0500 +++ postgis-1.5.2-new/extras/ogc_test_suite/README 2010-12-29 09:59:20.000000000 -0500 @@ -6,13 +6,13 @@ - All tests must be run in a database named 'ogc' in order for the AddGeometryColumn() function calls to work. - createdb ogc - createlang plpgsql ogc - psql ogc < ../../postgis.sql + createdb-@FINKPGRAWVERSION@ ogc + createlang-@FINKPGRAWVERSION@ plpgsql ogc + psql-@FINKPGRAWVERSION@ ogc < ../../postgis.sql - psql -a -f 1_schema.sql ogc >& 1_output.txt - psql -a -f 2_queries.sql ogc >& 2_output.txt - psql -a -f 3_cleanup.sql ogc >& 3_output.txt + psql-@FINKPGRAWVERSION@ -a -f 1_schema.sql ogc >& 1_output.txt + psql-@FINKPGRAWVERSION@ -a -f 2_queries.sql ogc >& 2_output.txt + psql-@FINKPGRAWVERSION@ -a -f 3_cleanup.sql ogc >& 3_output.txt - Load the test files in order. File 2 has the actual tests, with the correct answers for each test in the comments. diff -Nurd postgis-1.5.2/extras/template_gis/createdb.postgis.1 postgis-1.5.2-new/extras/template_gis/createdb.postgis.1 --- postgis-1.5.2/extras/template_gis/createdb.postgis.1 2006-05-31 02:43:12.000000000 -0400 +++ postgis-1.5.2-new/extras/template_gis/createdb.postgis.1 2010-12-29 09:59:20.000000000 -0500 @@ -43,7 +43,7 @@ .LP The environment variables for template_gis creation, removal and usage may be stored in files, as follows: .TP -.B /etc/default/postgis +.B @FINKPREFIX@/etc/default/postgis will designate default values for the whole system. .TP .B $HOME/.postgis/profile diff -Nurd postgis-1.5.2/extras/template_gis/mktemplate_gis.1 postgis-1.5.2-new/extras/template_gis/mktemplate_gis.1 --- postgis-1.5.2/extras/template_gis/mktemplate_gis.1 2006-05-31 02:43:12.000000000 -0400 +++ postgis-1.5.2-new/extras/template_gis/mktemplate_gis.1 2010-12-29 09:59:20.000000000 -0500 @@ -89,7 +89,7 @@ .LP The environment variables for template_gis creation, removal and usage may be stored in files, as follows: .TP -.B /etc/default/postgis +.B @FINKPREFIX@/etc/default/postgis will designate default values for the whole system. .TP .B $HOME/.postgis/profile diff -Nurd postgis-1.5.2/extras/template_gis/postgis_env.sh.in postgis-1.5.2-new/extras/template_gis/postgis_env.sh.in --- postgis-1.5.2/extras/template_gis/postgis_env.sh.in 2006-05-31 02:43:12.000000000 -0400 +++ postgis-1.5.2-new/extras/template_gis/postgis_env.sh.in 2010-12-29 09:59:20.000000000 -0500 @@ -3,7 +3,7 @@ # environment variables for postgis #read optional configuration files. last prevails -for file in "/etc/default/postgis" "$HOME/.postgis/profile" ; do +for file in "@FINKPREFIX@/etc/default/postgis" "$HOME/.postgis/profile" ; do if [ -f "$file" ]; then tmpval=`grep "^TEMPLATEDB=" $file | cut -d= -f2` if [ -n "$tmpval" ]; then @@ -25,12 +25,12 @@ done #cluster information should be set separately -if [ -x @prefix@/bin/pg_lsclusters ]; then +if [ -x @prefix@/bin/pg_lsclusters-@FINKPGRAWVERSION@ ]; then # PGCLUSTER=`pg_lsclusters | awk '{if ($3 == ENVIRON["PGPORT"]) {print $1"/"$2;}}'` # export PGCLUSTER # if [ -z $DBAUSER ]; then - DBAUSER=`pg_lsclusters | awk '{if ($3 == ENVIRON["PGPORT"]) {print $5;}}'` + DBAUSER=`pg_lsclusters-@FINKPGRAWVERSION@ | awk '{if ($3 == ENVIRON["PGPORT"]) {print $5;}}'` fi fi diff -Nurd postgis-1.5.2/extras/template_gis/postgres_lib.sh.in postgis-1.5.2-new/extras/template_gis/postgres_lib.sh.in --- postgis-1.5.2/extras/template_gis/postgres_lib.sh.in 2006-05-31 02:43:12.000000000 -0400 +++ postgis-1.5.2-new/extras/template_gis/postgres_lib.sh.in 2010-12-29 09:59:20.000000000 -0500 @@ -39,9 +39,9 @@ echo "you may be not allowed to do so (maybe wrong password)." exit 1 fi - ISDBAPGUSER=`psql -At -d template1 -c "select usename from pg_user where usesuper = true and usename = '$DBAUSER';" 2>&1` + ISDBAPGUSER=`psql-@FINKPGRAWVERSION@ -At -d template1 -c "select usename from pg_user where usesuper = true and usename = '$DBAUSER';" 2>&1` if [ ! "$ISDBAPGUSER" = "$DBAUSER" ]; then - MAYPOSTGRES=`psql -l` + MAYPOSTGRES=`psql-@FINKPGRAWVERSION@ -l` if [ -z "$MAYPOSTGRES" ]; then echo "either postgresql $PGCLUSTER is not running," echo "or $DBAUSER doesn't have privileges on cluster $PGCLUSTER." @@ -59,9 +59,9 @@ function template_rm() { TDB=$1 - db_update=`psql -d template1 -c "UPDATE pg_database SET datistemplate = FALSE WHERE datname = '$TDB';" 2>&1` + db_update=`psql-@FINKPGRAWVERSION@ -d template1 -c "UPDATE pg_database SET datistemplate = FALSE WHERE datname = '$TDB';" 2>&1` if [ "$db_update" = "UPDATE 1" ]; then - dropdb $TDB 2>&1 | cat > /dev/null + dropdb-@FINKPGRAWVERSION@ $TDB 2>&1 | cat > /dev/null else echo "$TDB could not be accessed. it may not exist" fi @@ -75,50 +75,50 @@ TDB=$1 GRUSER=$2 #of course it could be better to create as the $GRUSER where system user - db_create=`createdb $TDB 2>&1` + db_create=`createdb-@FINKPGRAWVERSION@ $TDB 2>&1` if [ "$db_create" = "CREATE DATABASE" ]; then - GRID=`psql -d template1 -At -c "select usesysid from pg_user where usename='$GRUSER';"` + GRID=`psql-@FINKPGRAWVERSION@ -d template1 -At -c "select usesysid from pg_user where usename='$GRUSER';"` if [ -n "$GRID" ]; then - psql -d $TDB -c "UPDATE pg_database SET datdba = $GRID WHERE datname = '$TDB';" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "UPDATE pg_database SET datdba = $GRID WHERE datname = '$TDB';" 2>&1 | cat > /dev/null fi - if [ -x @bindir@/createlang ]; then - @bindir@/createlang plpgsql $TDB 2>&1 | cat > /dev/null + if [ -x @bindir@/createlang-@FINKPGRAWVERSION@ ]; then + @bindir@/createlang-@FINKPGRAWVERSION@ plpgsql $TDB 2>&1 | cat > /dev/null fi for script in $SCRIPTS ; do - psql -d $TDB -f $script 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -f $script 2>&1 | cat > /dev/null done #pseudo tables for postgresql 7.2 and 7.4. feel free to add more, for other postgresql versions PSEUDO_TABLES="'pg_xactlock', 'sql_features', 'sql_implementation_info', 'sql_languages', 'sql_packages', 'sql_sizing', 'sql_sizing_profiles'" - TABLES=`psql -d $TDB -At -c "select tablename from pg_tables where tablename not in ($PSEUDO_TABLES);"` + TABLES=`psql-@FINKPGRAWVERSION@ -d $TDB -At -c "select tablename from pg_tables where tablename not in ($PSEUDO_TABLES);"` if [ -n "$GRID" ]; then for table in $TABLES ; do - psql -d $TDB -c "alter table $table owner to $GRUSER;" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "alter table $table owner to $GRUSER;" 2>&1 | cat > /dev/null done - psql -d $TDB -c "update pg_class set relowner=$GRID where relkind = 'S';" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "update pg_class set relowner=$GRID where relkind = 'S';" 2>&1 | cat > /dev/null else #maybe public, or group for grtable in $GRTABLES ; do - psql -d $TDB -c "grant all privileges on table $grtable to $GRUSER;" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "grant all privileges on table $grtable to $GRUSER;" 2>&1 | cat > /dev/null done fi for grschema in $GRSCHEMAS ; do - psql -d $TDB -c "alter schema $grschema owner to $GRUSER;" 2>&1 | cat > /dev/null - psql -d $TDB -c "grant all privileges on schema $grschema to $GRUSER;" 2>&1 | cat > /dev/null - STABLES=`psql -d $TDB -At -c "select tablename from pg_tables where schemaname = '$grschema';"` + psql-@FINKPGRAWVERSION@ -d $TDB -c "alter schema $grschema owner to $GRUSER;" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "grant all privileges on schema $grschema to $GRUSER;" 2>&1 | cat > /dev/null + STABLES=`psql-@FINKPGRAWVERSION@ -d $TDB -At -c "select tablename from pg_tables where schemaname = '$grschema';"` if [ -n "$GRID" ]; then for table in $STABLES ; do - psql -d $TDB -c "alter table $grschema.$table owner to $GRUSER;" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "alter table $grschema.$table owner to $GRUSER;" 2>&1 | cat > /dev/null done else #maybe public, or group for grtable in $GRTABLES ; do #contain specific schema - psql -d $TDB -c "grant all privileges on table $grtable to $GRUSER;" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "grant all privileges on table $grtable to $GRUSER;" 2>&1 | cat > /dev/null done fi done - psql -d $TDB -c "VACUUM FULL;" 2>&1 | cat > /dev/null - psql -d $TDB -c "VACUUM FREEZE;" 2>&1 | cat > /dev/null - psql -d $TDB -c "UPDATE pg_database SET datistemplate = TRUE WHERE datname = '$TDB';" 2>&1 | cat > /dev/null - psql -d $TDB -c "UPDATE pg_database SET datallowconn = FALSE WHERE datname = '$TDB';" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "VACUUM FULL;" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "VACUUM FREEZE;" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "UPDATE pg_database SET datistemplate = TRUE WHERE datname = '$TDB';" 2>&1 | cat > /dev/null + psql-@FINKPGRAWVERSION@ -d $TDB -c "UPDATE pg_database SET datallowconn = FALSE WHERE datname = '$TDB';" 2>&1 | cat > /dev/null else echo "$db_create" fi diff -Nurd postgis-1.5.2/extras/template_gis/profile postgis-1.5.2-new/extras/template_gis/profile --- postgis-1.5.2/extras/template_gis/profile 2009-01-15 13:35:06.000000000 -0500 +++ postgis-1.5.2-new/extras/template_gis/profile 2010-12-29 09:59:20.000000000 -0500 @@ -1,6 +1,6 @@ #those are the default variables for postgresql-postgis. -#this file will be scanned from /etc/default/postgis, +#this file will be scanned from @FINKPREFIX@/etc/default/postgis, #and then from $HOME/postgis/profile #values should NOT be in quotes diff -Nurd postgis-1.5.2/extras/template_gis/rmtemplate_gis.1 postgis-1.5.2-new/extras/template_gis/rmtemplate_gis.1 --- postgis-1.5.2/extras/template_gis/rmtemplate_gis.1 2006-05-31 02:43:12.000000000 -0400 +++ postgis-1.5.2-new/extras/template_gis/rmtemplate_gis.1 2010-12-29 09:59:20.000000000 -0500 @@ -45,7 +45,7 @@ .LP The environment variables for template_gis creation, removal and usage may be stored in files, as follows: .TP -.B /etc/default/postgis +.B @FINKPREFIX@/etc/default/postgis will designate default values for the whole system. .TP .B $HOME/.postgis/profile diff -Nurd postgis-1.5.2/extras/tiger_geocoder/INSTALL postgis-1.5.2-new/extras/tiger_geocoder/INSTALL --- postgis-1.5.2/extras/tiger_geocoder/INSTALL 2009-01-15 13:35:06.000000000 -0500 +++ postgis-1.5.2-new/extras/tiger_geocoder/INSTALL 2010-12-29 09:59:20.000000000 -0500 @@ -57,7 +57,7 @@ - Load the fuzzy string matching functions. These must first be compiled, and may be found in the contrib directory of the postgres source directory. - psql [-p (port)] (database) < /usr/local/src/postgresql-7.4.5/contrib/fuzzystrmatch/fuzzystrmatch.sql + psql-@FINKPGRAWVERSION@ [-p (port)] (database) < /usr/local/src/postgresql-7.4.5/contrib/fuzzystrmatch/fuzzystrmatch.sql - Ensure that the TIGER data is loaded into the target database. @@ -68,9 +68,9 @@ database must be populated before this script is run. Indicies are also created in this script. - psql [-p (port)] (database) < lookup_tables.sql + psql-@FINKPGRAWVERSION@ [-p (port)] (database) < lookup_tables.sql - Load the function scripts. This script loads the geocode function, and all support modules and functions required by it. - psql [-p (port)] (database) < tiger_geocoder.sql + psql-@FINKPGRAWVERSION@ [-p (port)] (database) < tiger_geocoder.sql diff -Nurd postgis-1.5.2/extras/tiger_geocoder/import/newdb.sh postgis-1.5.2-new/extras/tiger_geocoder/import/newdb.sh --- postgis-1.5.2/extras/tiger_geocoder/import/newdb.sh 2009-01-15 13:35:06.000000000 -0500 +++ postgis-1.5.2-new/extras/tiger_geocoder/import/newdb.sh 2010-12-29 09:59:20.000000000 -0500 @@ -1,6 +1,6 @@ #!/bin/bash -dropdb $1 -createdb $1 -createlang plpgsql $1 -psql $1 roads.sql - # psql -d roadsdb -f roads.sql + # psql-@FINKPGRAWVERSION@ -d roadsdb -f roads.sql A conversion and upload can be done all in one step using UNIX pipes: - # shp2pgsql shaperoads roadstable roadsdb | psql -d roadsdb + # shp2pgsql shaperoads roadstable roadsdb | psql-@FINKPGRAWVERSION@ -d roadsdb AUTHORS diff -Nurd postgis-1.5.2/postgis/Makefile.in postgis-1.5.2-new/postgis/Makefile.in --- postgis-1.5.2/postgis/Makefile.in 2010-01-08 17:48:29.000000000 -0500 +++ postgis-1.5.2-new/postgis/Makefile.in 2010-12-29 09:59:20.000000000 -0500 @@ -68,8 +68,8 @@ # to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an # older version of PostGIS, rather than with the static liblwgeom.a # supplied with newer versions of PostGIS -PG_CPPFLAGS+=@CPPFLAGS@ -I../liblwgeom -SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/liblwgeom.a +PG_CPPFLAGS+=@CPPFLAGS@ @PGSQL_FE_CPPFLAGS@ -I../liblwgeom +SHLIB_LINK+=@SHLIB_LINK@ @PGSQL_FE_LDFLAGS@ ../liblwgeom/liblwgeom.a # Extra files to remove during 'make clean' EXTRA_CLEAN=$(SQL_OBJS) diff -Nurd postgis-1.5.2/regress/README postgis-1.5.2-new/regress/README --- postgis-1.5.2/regress/README 2008-10-10 00:39:54.000000000 -0400 +++ postgis-1.5.2-new/regress/README 2010-12-29 09:59:20.000000000 -0500 @@ -10,7 +10,7 @@ -f | -- use | (pipe) as the field separator between columns -t -- output rows only, ie. no table header - cat file.sql | psql -F\| -t -A > file_expected + cat file.sql | psql-@FINKPGRAWVERSION@ -F\| -t -A > file_expected 3. Edit regress/Makefile adding to the TESTS variable. Any _expected.in files need to be added to the PREPROC variable. diff -Nurd postgis-1.5.2/regress/run_test postgis-1.5.2-new/regress/run_test --- postgis-1.5.2/regress/run_test 2010-02-02 18:47:46.000000000 -0500 +++ postgis-1.5.2-new/regress/run_test 2010-12-29 09:59:20.000000000 -0500 @@ -36,7 +36,7 @@ -PSQL="psql" +PSQL="psql-@FINKPGRAWVERSION@" if [ -z "$TMPDIR" ]; then TMPDIR=/tmp/pgis_reg_$$ @@ -401,8 +401,8 @@ if test x"$OPT_CREATE" = "xyes"; then echo "Creating spatial db ${DB} " - createdb "${DB}" > ${TMPDIR}/regress_log - createlang plpgsql "${DB}" >> ${TMPDIR}/regress_log + createdb-@FINKPGRAWVERSION@ "${DB}" > ${TMPDIR}/regress_log + createlang-@FINKPGRAWVERSION@ plpgsql "${DB}" >> ${TMPDIR}/regress_log ${PSQL} -f postgis.sql "${DB}" >> ${TMPDIR}/regress_log 2>&1 else @@ -424,7 +424,7 @@ libver=`${PSQL} -tAc "select postgis_lib_version()" "${DB}"` if [ -z "$libver" ]; then - dropdb "${DB}" + dropdb-@FINKPGRAWVERSION@ "${DB}" echo echo " Something went wrong (no postgis installed in ${DB})." if [ -z "$db_exists" ]; then @@ -511,7 +511,7 @@ if test x"$OPT_DROP" = "xyes" -a x"$OPT_CREATE" = "xyes"; then sleep 1 - dropdb "${DB}" > /dev/null + dropdb-@FINKPGRAWVERSION@ "${DB}" > /dev/null else : echo "Drop database ${DB} manually" fi diff -Nurd postgis-1.5.2/regress/test_index_concurrency postgis-1.5.2-new/regress/test_index_concurrency --- postgis-1.5.2/regress/test_index_concurrency 2006-01-21 03:40:41.000000000 -0500 +++ postgis-1.5.2-new/regress/test_index_concurrency 2010-12-29 09:59:20.000000000 -0500 @@ -17,23 +17,23 @@ echo "Index Creation will take some time..." echo "" - createdb > /dev/null - createlang plpgsql > /dev/null - psql -f ../lwpostgis.sql > /dev/null 2>&1 + createdb-@FINKPGRAWVERSION@ > /dev/null + createlang-@FINKPGRAWVERSION@ plpgsql > /dev/null + psql-@FINKPGRAWVERSION@ -f ../lwpostgis.sql > /dev/null 2>&1 - psql -f regress_lots_of_points.sql - psql -c "CREATE INDEX quick_gist on test using gist (the_geom)" + psql-@FINKPGRAWVERSION@ -f regress_lots_of_points.sql + psql-@FINKPGRAWVERSION@ -c "CREATE INDEX quick_gist on test using gist (the_geom)" else if [ "$1" = "run" ]; then # Concurrent clients: - psql -c "update test set num=-num WHERE the_geom && 'BOX3D(125 125,135 135)'::box3d" & - psql -c "update test set num=-num WHERE the_geom && 'BOX3D(125 125,135 135)'::box3d" & - psql -c "update test set num=-num WHERE the_geom && 'BOX3D(125 125,135 135)'::box3d" & + psql-@FINKPGRAWVERSION@ -c "update test set num=-num WHERE the_geom && 'BOX3D(125 125,135 135)'::box3d" & + psql-@FINKPGRAWVERSION@ -c "update test set num=-num WHERE the_geom && 'BOX3D(125 125,135 135)'::box3d" & + psql-@FINKPGRAWVERSION@ -c "update test set num=-num WHERE the_geom && 'BOX3D(125 125,135 135)'::box3d" & wait else if [ "$1" = "drop" ]; then - dropdb $DB > /dev/null + dropdb-@FINKPGRAWVERSION@ $DB > /dev/null else echo "Usage: $0 [prepare|run|drop]" fi diff -Nurd postgis-1.5.2/topology/README postgis-1.5.2-new/topology/README --- postgis-1.5.2/topology/README 2005-10-13 12:21:49.000000000 -0400 +++ postgis-1.5.2-new/topology/README 2010-12-29 09:59:20.000000000 -0500 @@ -22,11 +22,11 @@ To enable topology support: $ make - $ psql -f topology.sql + $ psql-@FINKPGRAWVERSION@ -f topology.sql To uninstall: - psql -c 'drop schema topology cascade' + psql-@FINKPGRAWVERSION@ -c 'drop schema topology cascade' Upgrading currently requires uninstall. diff -Nurd postgis-1.5.2/topology/test/Makefile postgis-1.5.2-new/topology/test/Makefile --- postgis-1.5.2/topology/test/Makefile 2006-05-22 07:17:34.000000000 -0400 +++ postgis-1.5.2-new/topology/test/Makefile 2010-12-29 09:59:20.000000000 -0500 @@ -32,39 +32,39 @@ test: inittopo load loadmore hier cache pred invalid edit initdb: - createdb $(DATABASE) - createlang plpgsql $(DATABASE) - psql -f ../../lwpostgis.sql $(DATABASE) + createdb-@FINKPGRAWVERSION@ $(DATABASE) + createlang-@FINKPGRAWVERSION@ plpgsql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f ../../lwpostgis.sql $(DATABASE) inittopo: - psql -f ../topology.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f ../topology.sql $(DATABASE) load: - psql -f load_topology.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f load_topology.sql $(DATABASE) loadmore: - psql -f more_features.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f more_features.sql $(DATABASE) hier: - psql -f hierarchy.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f hierarchy.sql $(DATABASE) validate: - psql -f validate_topology.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f validate_topology.sql $(DATABASE) cache: - psql -f cache_geometries.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f cache_geometries.sql $(DATABASE) invalid: - psql -f invalid_topology.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f invalid_topology.sql $(DATABASE) sqlmm: - psql -f sqlmm_topology.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f sqlmm_topology.sql $(DATABASE) topopred: topo_predicates.sql - @psql -tf topo_predicates.sql $(DATABASE) + @psql-@FINKPGRAWVERSION@ -tf topo_predicates.sql $(DATABASE) geompred: geom_predicates.sql - @psql -tf geom_predicates.sql $(DATABASE) + @psql-@FINKPGRAWVERSION@ -tf geom_predicates.sql $(DATABASE) topo_predicates.sql: predicates.sql.in @cpp -P -traditional-cpp predicates.sql.in | sed -e 's:@COLUMN@:feature:g;s:@SCHEMA@:topology.:g' > topo_predicates.sql @@ -73,8 +73,8 @@ @cpp -P -traditional-cpp predicates.sql.in | sed -e 's:@COLUMN@:the_geom:g;s:@SCHEMA@::g' > geom_predicates.sql edit: - psql -f edit_topology.sql $(DATABASE) + psql-@FINKPGRAWVERSION@ -f edit_topology.sql $(DATABASE) clean distclean: rm -f geom_predicates.sql topo_predicates.sql - -dropdb $(DATABASE) + -dropdb-@FINKPGRAWVERSION@ $(DATABASE) diff -Nurd postgis-1.5.2/utils/new_postgis_restore.pl postgis-1.5.2-new/utils/new_postgis_restore.pl --- postgis-1.5.2/utils/new_postgis_restore.pl 2009-02-10 15:06:00.000000000 -0500 +++ postgis-1.5.2-new/utils/new_postgis_restore.pl 2010-12-29 09:59:20.000000000 -0500 @@ -4,11 +4,11 @@ $usage = qq{ Usage: $me - Restore a custom dump (pg_dump -Fc) of a PostGIS-enabled database. - First dump the old database: pg_dump -Fc > - Then create a new database: createdb - Then install PostGIS in the new database: psql -f /postgis.sql - Finally, run this script on the old dump: $me | psql + Restore a custom dump (pg_dump-@FINKPGRAWVERSION@ -Fc) of a PostGIS-enabled database. + First dump the old database: pg_dump-@FINKPGRAWVERSION@ -Fc > + Then create a new database: createdb-@FINKPGRAWVERSION@ + Then install PostGIS in the new database: psql-@FINKPGRAWVERSION@ -f /postgis.sql + Finally, run this script on the old dump: $me | psql-@FINKPGRAWVERSION@ }; @@ -17,8 +17,8 @@ $dumpfile = $ARGV[0]; $manifest = $dumpfile . ".lst"; -die "$me:\tUnable to find 'pg_dump' on the path.\n" if ! `pg_dump --version`; -die "$me:\tUnable to find 'pg_restore' on the path.\n" if ! `pg_restore --version`; +die "$me:\tUnable to find 'pg_dump-@FINKPGRAWVERSION@' on the path.\n" if ! `pg_dump-@FINKPGRAWVERSION@ --version`; +die "$me:\tUnable to find 'pg_restore-@FINKPGRAWVERSION@' on the path.\n" if ! `pg_restore-@FINKPGRAWVERSION@ --version`; die "$me:\tUnable to open dump file '$dumpfile'.\n" if ! -f $dumpfile; $DEBUG = 0; @@ -45,7 +45,7 @@ print STDERR " Writing manifest of things to read from dump file...\n"; -open( DUMP, "pg_restore -l $dumpfile |" ) || die "$me:\tCannot open dump file '$dumpfile'\n"; +open( DUMP, "pg_restore-@FINKPGRAWVERSION@ -l $dumpfile |" ) || die "$me:\tCannot open dump file '$dumpfile'\n"; open( MANIFEST, ">$manifest" ) || die "$me:\tCannot open manifest file '$outputfile'\n"; while( my $l = ) { @@ -66,7 +66,7 @@ # unwanted bits. # print STDERR " Writing ASCII to stdout...\n"; -open( INPUT, "pg_restore -L $manifest $dumpfile |") || die "$me:\tCan't run pg_restore\n"; +open( INPUT, "pg_restore-@FINKPGRAWVERSION@ -L $manifest $dumpfile |") || die "$me:\tCan't run pg_restore-@FINKPGRAWVERSION@\n"; while( my $l = ) { next if $l =~ /^ *--/; diff -Nurd postgis-1.5.2/utils/postgis_restore.pl postgis-1.5.2-new/utils/postgis_restore.pl --- postgis-1.5.2/utils/postgis_restore.pl 2010-01-20 15:17:09.000000000 -0500 +++ postgis-1.5.2-new/utils/postgis_restore.pl 2010-12-29 09:59:20.000000000 -0500 @@ -397,7 +397,7 @@ # print "Scanning $dump list\n"; open( OUTPUT, ">$dumplist") || die "Can't write to ".$dump.".list\n"; -open( INPUT, "pg_restore -l $dump |") || die "Couldn't run pg_restore -l $dump\n"; +open( INPUT, "pg_restore-@FINKPGRAWVERSION@ -l $dump |") || die "Couldn't run pg_restore-@FINKPGRAWVERSION@ -l $dump\n"; while( my $line = ) { next if $line =~ /^;/; @@ -641,7 +641,7 @@ close(OUTPUT); print "Producing ascii dump $dumpascii\n"; -open( INPUT, "pg_restore -L $dumplist $dump |") || die "Can't run pg_restore\n"; +open( INPUT, "pg_restore-@FINKPGRAWVERSION@ -L $dumplist $dump |") || die "Can't run pg_restore\n"; open( OUTPUT, ">$dumpascii") || die "Can't write to $dumpascii\n"; while( my $line = ) { @@ -701,7 +701,7 @@ # when implemented operators skip must be disabled # in the first scan of ToC } -close(INPUT) || die "pg_restore call failed\n"; +close(INPUT) || die "pg_restore-@FINKPGRAWVERSION@ call failed\n"; close(OUTPUT); #exit(1); @@ -710,15 +710,15 @@ # Create the new db and install plpgsql language # print "Creating db ($dbname)\n"; -`createdb $createdb_opt $dbname`; +`createdb-@FINKPGRAWVERSION@ $createdb_opt $dbname`; die "Database creation failed\n" if ($?); print "Adding plpgsql\n"; -`createlang plpgsql $dbname`; +`createlang-@FINKPGRAWVERSION@ plpgsql $dbname`; # # Open a pipe to the SQL monitor # -open( PSQL, "| psql -a $dbname") || die "Can't run psql\n"; +open( PSQL, "| psql-@FINKPGRAWVERSION@ -a $dbname") || die "Can't run psql\n"; # # Source new postgis.sql @@ -745,4 +745,4 @@ open(INPUT, "<$dumpascii") || die "Can't read $postgissql\n"; while() { print PSQL; } close(INPUT); -close(PSQL) || die "psql run failed\n" +close(PSQL) || die "psql-@FINKPGRAWVERSION@ run failed\n"