Hi Bruce,
I'm pretty new to GIS and PostGIS, but I'll try to offer an idea. It appears that you might not have the postgis code loaded. I'm going to guess that Nicholas' suggestion involved setting up the template_postgis database so that you might make postgis enabled databases without manually importing the postgis.sql and the spatial_ref_sys.sql? Are you confident that you did this properly? The error you're getting makes me thing that the postgis stored procedures are not properly loaded. If you log into the DB using psql and execute \df+ AddGeometryColumn Do you get an emptry result? If this is not the case you might try the same on your template database. Good luck, Andy On 8/15/11 6:28 AM, b...@brucecallander.com wrote:
I am following the Geoserver Getting Started documentation in order to create an example PostGIS table. I am working on a MacBook running Snow Leopard v10.6.8 Thanks to previous advice from the forum (Nicolas Ribot) I was able to create the sample database 'nyc' based on the template 'template_postgis'. I am now encountering errors in trying to move to the next stage of importing the file 'nyc_buildings.sql' into the database. The Unix command I am using is: $ /usr/local/pgsql-9.0/bin/psql -f /Users/bacmac/nyc_buildings.sql nyc The Geoserver instructions are not explicit about where to put the nyc_buildings.sql file so I have left it in my own user directory 'bacmac'. Execution of the command produces a string of errors beginning with: CREATE TABLE psql:/Users/bacmac/nyc_buildings.sql:4: ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, 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 realise that part of my difficulties stem from a lack of conceptual awareness of how the various parts of PostGIS fit together (databases, data stores, tables, clusters...) and what directory structure the PostGIS installation creates. I am very familiar with Access databases but that may be dangerous because the basic paradigm for PostGIS may be different. Are there any diagrams out there that give a basic conceptual view of Geoserver and PostIGIS? Also, I am coming at this from an enterprise SDI policy and implementation end, not from an IT/Unix background (probably very obvious!). Trying to construct a coherent overall picture based on the predominantly text-based, IT-heavy advice online is proving a challenge. Many thanks Bruce Callander _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
-- xforty technologies Andrew Libby http://xforty.com 484-887-7505 x 1115 _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users