function addgeometrycolumn does not exist

View: New views
3 Messages — Rating Filter:   Alert me  

function addgeometrycolumn does not exist

by cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi There

I'm pulling my hair out with a problem, and I hope someone can help me...
I'm on a ubuntu gutsy server, with postgres 8.2 and postgis installed through apt-get.

Now when working with the database, it now tells me that the functions do not exist:

test=# select AddGeometryColumn('public','navaids','geom',32611,2);
ERROR: function addgeometrycolumn("unknown", "unknown", "unknown", integer, integer) does not exist
LINE 1: select AddGeometryColumn('public','navaids','geom',32611,2);
^
HINT: No function matches the given name and argument types. You may need to add explicit type casts.

------
However when I list my functions using \df this is a snippet of what i see:
public | addgeometrycolumn | text | character varying, character varying, character varying, character varying, integer, character varying, integer
public | addgeometrycolumn | text | character varying, character varying, character varying, integer, character varying, integer
public | addgeometrycolumn | text | character varying, character varying, integer, character varying, integer
--------------

So the function should be in there, when I try other postgis functions like pointfromtext, it works..

lwpostgis.sql and spatial_ref_sys.sql have been imported, and I'm also tried creating a database using template_postgis.

Version info:
test=# select postgis_full_version();
                               postgis_full_version
----------------------------------------------------------------------------------
 POSTGIS="1.2.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006" USE_STATS
(1 row)

I hope someone can help me with this.

Re: function addgeometrycolumn does not exist

by Chris Hermansen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looking at the docs
http://postgis.refractions.net/docs/ch06.html#id3029134 and your note, I
infer that your:

schema = public
table = navaids
geometry-column = geom
srid = 32611
dimension = 2

but what is your geometry type?  that is supposed to be your second-last
argument.

cummings wrote:

> Hi There
>
> I'm pulling my hair out with a problem, and I hope someone can help me...
> I'm on a ubuntu gutsy server, with postgres 8.2 and postgis installed
> through apt-get.
>
> Now when working with the database, it now tells me that the functions do
> not exist:
>
> test=# select AddGeometryColumn('public','navaids','geom',32611,2);
> ERROR: function addgeometrycolumn("unknown", "unknown", "unknown", integer,
> integer) does not exist
> LINE 1: select AddGeometryColumn('public','navaids','geom',32611,2);
> ^
> HINT: No function matches the given name and argument types. You may need to
> add explicit type casts.
>
> ------
> However when I list my functions using \df this is a snippet of what i see:
> public | addgeometrycolumn | text | character varying, character varying,
> character varying, character varying, integer, character varying, integer
> public | addgeometrycolumn | text | character varying, character varying,
> character varying, integer, character varying, integer
> public | addgeometrycolumn | text | character varying, character varying,
> integer, character varying, integer
> --------------
>
> So the function should be in there, when I try other postgis functions like
> pointfromtext, it works..
>
> lwpostgis.sql and spatial_ref_sys.sql have been imported, and I'm also tried
> creating a database using template_postgis.
>
> Version info:
> test=# select postgis_full_version();
>                                postgis_full_version
> ----------------------------------------------------------------------------------
>  POSTGIS="1.2.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006"
> USE_STATS
> (1 row)
>
> I hope someone can help me with this.
>
>  


--
Regards,

Chris Hermansen · mailto:clh@...
tel:+1.604.714.2878 · fax:+1.604.733.0631
Timberline Natural Resource Group · http://www.timberline.ca
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5

C'est ma façon de parler.

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

RE: function addgeometrycolumn does not exist

by Gregory Williamson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

RE: [postgis-users] function addgeometrycolumn does not exist

Off hand, I'd guess that you are not giving the right parameters.

> ------
> However when I list my functions using \df this is a snippet of what i see:
> public | addgeometrycolumn | text | character varying, character varying,
> character varying, character varying, integer, character varying, integer

    4 varchar params, an integer, another varchar and another int

OR

> public | addgeometrycolumn | text | character varying, character varying,
> character varying, integer, character varying, integer

   3 varchar params, an int, a var char and another int.

OR

> public | addgeometrycolumn | text | character varying, character varying,
> integer, character varying, integer
    2 varchar params, an int, a var char and an int

> --------------

You had:
test=# select AddGeometryColumn('public','navaids','geom',32611,2);

    so 3 varchars, and 2 ints.

PostgreSQL is complaining correctly that there is no match.

I don't have a manual at hand but it seems to me are missing a parameter ... try rereading the documents and see what the columns are defined as. I think maybe you are missing a specification of what sort of geometry is to be used (POINT, POLYGON, GEOMETRY, etc.). Perhaps the missing text from the second variant, between the two int parameters ?

HTH,

Greg Williamson
Senior DBA
GlobeXplorer LLC, a DigitalGlobe company


_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users