[postgis-users] ERROR: relation "geometry_columns" does not exist

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Mar 6 01:23:24 PST 2008


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



More information about the postgis-users mailing list