[postgis-users] addgeometrycolumn() does not exist

Robert W. Burgholzer rburgholzer at maptech-inc.com
Fri Jun 4 17:18:27 PDT 2004


Maybe PostgreSQL doesn't like the "#" in your column names. There are quite 
a few things it doesn't like in column names really. It's worth a try to 
change that column.

r.b.

At 04:57 PM 6/4/2004 -0700, you wrote:
>dear readers,
>
>i'm running postgresql 7.4.2 with postgis 0.8.1 on linux redhat 8.
>
>i successfully converted a shapefile (cnty24k97.shp from
>http://gis.ca.gov/BrowseCatalog.epl) into sql (shp2pgsql cnty24k97.shp
>counties mapitdb > counties.sql). while uploading it to my database
>(psql -d mapitdb -f counties.sql), i get this error:
>
><error>
>psql:counties.sql:1: ERROR:  syntax error at or near "#" at character 76
>psql:counties.sql:2: ERROR:  function addgeometrycolumn("unknown",
>"unknown", "unknown", integer, "unknown", integer) does not exist
>HINT:  No function matches the given name and argument types. You may
>need to add explicit type casts.
>BEGIN
>...
>psql:counties.sql:174: ERROR:  syntax error at or near "#" at character
>51
>psql:counties.sql:175: ERROR:  syntax error at or near "#" at character
>51
>COMMIT
>psql:counties.sql:176: ERROR:  relation "counties" does not exist
>psql:counties.sql:177: ERROR:  relation "counties_gid_seq" does not
>exist
></error>
>
>here is a snippit from the converted shapefile:
>
><snippit>
>CREATE TABLE counties (gid serial, AREA float8, PERIMETER float8,
>CNTY24K97# int4, CNTY24K97- int4, NAME varchar, NAME_CAP varchar, NUM
>int4, FIPS_CODE int4);
>select
>AddGeometryColumn('','counties','the_geom','-1','MULTIPOLYGON',2);
>begin;
>Insert into counties
>(gid,AREA,PERIMETER,CNTY24K97#,CNTY24K97- 
>,NAME,NAME_CAP,NUM,FIPS_CODE,the_geom)
>values('0','2625844992.000000','306174.219000','2','3','Del Norte','DEL
>NORTE','8','15',GeometryFromText('MULTIPOLYGON(((-346072.6875
>440055.6875 ,-346105.3125 440068.65625 ,-346134.65625 440091.03125
>,-346175.34375 440118.75 ,-346328.84375 440208.3125 ,-346462.90625
>440279.8125 ,-346547.65625 440322.875 ,-346624.65625 440345.6875
>,-346687.46875 440362.0625 ,-346797.8125 440381.90625 ,-346850.78125
>440393 ,-346927.84375 440413.84375 ,-346956.21875 440425.6875
>,-347058.15625 440439.78125 ,-347101.46875 440440.09375 ,-347178.28125
>440433.4375 ,-347243.34375 440432.40625 ,-347343.28125 440426.46875
>,-347395.28125 440426.03125 ,-347449.1875 440415.6875 ,-347486.875
>440412.34375 ,-347517.9375 440396.8125 ,-347558.875 440385.0625
>,-347583.40625 440385.812...
></snippit>
>
>any thoughts?
>
>thanks,
>aaron
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users

Robert Burgholzer
Environmental Engineer
MapTech Inc.
http://www.maptech-inc.com/ 




More information about the postgis-users mailing list