[postgis-users] Difficulty importing example file nyc_buildings.sql

bac at brucecallander.com bac at brucecallander.com
Wed Aug 17 08:33:35 PDT 2011


Thanks to Ben Madin for  advice. I removed the apostrophes from the SRID in nyc_buildings.sql (using TextEdit) and re-ran the command

/usr/local/pgsql-9.0/bin/psql -f /Users/bacmac/nyc_buildings.sql nyc

Unfortunately it produced the same result:

BEGIN
psql:/Users/bacmac/nyc_buildings.sql:3: NOTICE:  CREATE TABLE will create implicit sequence "nyc_buildings_gid_seq" for serial column "nyc_buildings.gid"
psql:/Users/bacmac/nyc_buildings.sql:3: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "nyc_buildings_pkey" for table "nyc_buildings"
CREATE TABLE
psql:/Users/bacmac/nyc_buildings.sql:4: ERROR:  function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist
LINE 1: SELECT AddGeometryColumn('','nyc_buildings','the_geom',2908,...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
psql:/Users/bacmac/nyc_buildings.sql:5: ERROR:  current transaction is aborted, commands ignored until end of transaction block
psql:/Users/bacmac/nyc_buildings.sql:6: ERROR:  current transaction is aborted … and so on.

I wonder if I need to adjust $PATH so that the function AddGeometryColumn is found? Even when I change directory to /usr/local/pgsql-9.0/bin my Mac cannot find psql if I type that command on its own. I always have to use the full pathname /usr/local/pgsql-9.0/bin/psql. Strange, because typing 'ls' after changing the directory brings up the complete list of files including psql.

Bruce Callander

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110817/bc9dae57/attachment.html>


More information about the postgis-users mailing list