ERROR: relation "geometry_columns" does not exist

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

ERROR: relation "geometry_columns" does not exist

by Sam Boggess :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've been using shp2pgsql successfully on a freebsd platform for awhile now.  I'd then take the the .sql file I out put and run it as a batch file on PG Navicat.  I was doing a bunch of these and all of a sudden I started getting this error:

Error at query 3: ERROR:  relation "geometry_columns" does not exist
CONTEXT:  SQL statement "DELETE FROM geometry_columns WHERE
                f_table_catalog = '' AND f_table_schema = 'public' AND f_table_name = 'cottonwood_wa' AND f_geometry_column = 'the_geom'"
PL/pgSQL function "addgeometrycolumn" line 102 at execute statement
SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )"
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement


I've gone back and tried to redo some that worked previously and they get this error now too.  I tried restarting PG, but no luck.  Any help would be greatly appreciated.  This is very frustrating!

Re: ERROR: relation "geometry_columns" does not exist

by Mark Cave-Ayland-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 06 March 2008 07:23:21 Sam Boggess wrote:

> I've been using shp2pgsql successfully on a freebsd platform for awhile
> now. I'd then take the the .sql file I out put and run it as a batch file
> on PG Navicat.  I was doing a bunch of these and all of a sudden I started
> getting this error:
>
> Error at query 3: ERROR:  relation "geometry_columns" does not exist
> CONTEXT:  SQL statement "DELETE FROM geometry_columns WHERE
> f_table_catalog = '' AND f_table_schema = 'public' AND f_table_name =
> 'cottonwood_wa' AND f_geometry_column = 'the_geom'"
> PL/pgSQL function "addgeometrycolumn" line 102 at execute statement
> SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )"
> PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement
>
>
> I've gone back and tried to redo some that worked previously and they get
> this error now too.  I tried restarting PG, but no luck.  Any help would be
> greatly appreciated.  This is very frustrating!


Hi Sam,

Unfortunately you haven't told us how you generated your .sql files, what was
in them, how you are trying to restore them and what version of PostgreSQL
you are using. So without more information we can't help you much :(

On the positive side, the ERROR above is fairly obvious - you are missing the
PostGIS geometry_columns table either from your database or earlier on in
your .sql file.


HTH,

Mark.

--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: ERROR: relation "geometry_columns" does not exist

by Sam Boggess :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Mark Cave-Ayland-3 wrote:
Hi Sam,

Unfortunately you haven't told us how you generated your .sql files, what was
in them, how you are trying to restore them and what version of PostgreSQL
you are using. So without more information we can't help you much :(

On the positive side, the ERROR above is fairly obvious - you are missing the
PostGIS geometry_columns table either from your database or earlier on in
your .sql file.


HTH,

Mark.

--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Mark,

Thank you for the reply.  It looks like my issue as simple as I must have accidentally deleted the geometry_columns table when I was cleaning up my database.  What would be the easiest way to restore it?

Thank you for your assistance,
Sam