[postgis-users] OIDs and AddGeometryColumn
Dylan Keon
dbkeon.ml at gmail.com
Wed Dec 7 09:23:41 PST 2005
On 12/7/05, strk at refractions.net <strk at refractions.net> wrote:
> On Tue, Dec 06, 2005 at 04:43:24PM -0800, Dylan Keon wrote:
> > Hi all,
> >
> > I upgraded a server to PostgreSQL 8.1.0 and PostGIS 1.0.5 (coming from
> > 7.4.5/0.8.2 - ancient, I know :). I can't do a SELECT
> > AddGeometryColumn, apparently because there are no OID columns in the
> > restored tables. The default behavior in 8.1 is to not create OIDs.
> >
> > tsunami=# SELECT AddGeometryColumn('temp','geom',-1,'POINT',2);
> > ERROR: column reference "oid" is ambiguous
> >
> > Do I have to force OID creation just so that I can use
> > AddGeometryColumn? Or am I missing something?
>
> You need OID just in the geometry_columns table.
> Neither pg_restore nor postgis_restore.pl will do this
> for you, unfortunately.
>
> I suggest you backup your geometry_columns table, recreate
> it using the CREATE TABLE found in lwpostgis.sql and finally
> populate the new one from the backup.
strk,
That worked. Thanks!
Dylan
More information about the postgis-users
mailing list