Re: Help needed - error while adding geometry

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: ajay kamath <ajay_k9(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Help needed - error while adding geometry
Date: 2006-09-17 13:34:31
Message-ID: 20060917133431.GA96493@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Sep 15, 2006 at 11:55:35AM -0700, ajay kamath wrote:
> SELECT AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); (this statement gives the blow error)
>
> ERROR: function addgeometrycolumn("unknown", "unknown", "unknown", integer, "unknown", integer) does not exist

It looks like you don't have PostGIS loaded. This command runs
successfully in a PostGIS-enabled database.

> Things that i tried:
> (1) one of the help sites asks user to run
> postgis.sql and spatial_reference_sys.sql files......
> i seacrhed for postgis.sql file ..its not present in the installed
> directories. Also i copied the contents of spatial_reference_sys.sql
> to the sql prompt and tried executing it. It again throws an error.

The file names are lwpostgis.sql and spatial_ref_sys.sql and they
must be loaded in that order because the former creates the table
that the latter populates. Also, you'll need install PL/pgSQL
(e.g., with "createlang plpgsql dbname") before loading lwpostgis.sql.
For more information see the Installation chapter of the PostGIS
documentation.

http://postgis.refractions.net/docs/ch02.html

If you continue to have trouble with PostGIS then you might get
more help on the postgis-users mailing list.

http://postgis.refractions.net/mailman/listinfo/postgis-users

--
Michael Fuhr

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message jcvdm 2006-09-18 12:17:45 starting postmaster under windows
Previous Message Shoaib Mir 2006-09-17 12:33:46 Re: Help needed - error while adding geometry