[postgis-users] AddGeometryColumn => column does not exist

John Taber jtaber at johntaber.net
Fri Nov 18 19:00:27 PST 2005


Hmmm, Still no go.  But I think that is on the right track.
Latest error msg:

ERROR: function addgeometrycolumn(character varying, ....) does not 
exist HINT: No function matches the given name and argument types.  You 
may need to add explicit type casts.


Owen Jacobson wrote:
> John Taber wrote:
>  
> 
>>I've done a fresh install of 8.1 postgres/postgis.  I've done 
>>the following:
> 
> ...
> 
>># CREATE TABLE gtest(ID int4, NAME varchar(20));
>>CREATE TABLE
>># SELECT AddGeometryColumn("gtest","roads_geom",-1,"GEOMETRY",3);
>>ERROR: column "gtest" does not exist
>>
>>1) The tutorial and manual 4.2.3 use single quotes - my 
>>system chokes on 
>>that with quoted fields shown as unknown and the function 
>>doesn't match.
>>
>>2) I've tried both syntax shown in 4.2.3 (with and without 
>>schema name) 
>>and still get the column does not exist error. If the schema 
>>is put in 
>>as null ("") the system chokes with ERROR: zero length 
>>delimited... If 
>>put in as space (" ") then the column does not exist error appears.
>>
>>What is wrong here ?
> 
> 
> Double-quotes in an SQL query mark a field literal, not a string.  AddGeometryColumn takes strings (varchar, IIRC), not field literals.
> 
> Try:
> 
> # SELECT AddGeometryColumn ('gtest'::VARCHAR, 'roads_geom'::VARCHAR, -1, 'GEOMETRY'::VARCHAR, 3);
> 
> This shouldn't be necessary but I haven't used postGIS with postgresql 8.1 yet.
> 
> -Owen
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 



More information about the postgis-users mailing list