[postgis-users] Geomtry_columns may not have an oid
Mark Cave-Ayland
m.cave-ayland at webbased.co.uk
Tue May 10 04:19:09 PDT 2005
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of strk at refractions.net
> Sent: 10 May 2005 11:41
> To: 'PostGIS Users Discussion'
> Subject: Re: [postgis-users] Geomtry_columns may not have an oid
>
>
> On Tue, May 10, 2005 at 10:54:36AM +0100, Mark Cave-Ayland wrote:
>
> (...)
>
> > I haven't looked at the proposed patch but geometry_columns is
> > effectively a "system" table in the context of PostGIS
> anyway. I would
> > agree and say force the creation of the geometry_columns table WITH
> > OIDS.
>
> Ok, I think we should do it as soon as possible so that in
> the event pgsql will change default table creation policy
> geometry_columns will not be affected. I'd use explicit OID
> request in 1.0.1
>
> This would be a change in the .sql file, but I think we can
> avoid incrementing script version number (thus requiring user
> to dump/reload). Do you agree ?
Hi strk,
I agree. I think that most people who have default installations won't be
affected by this until 8.1 so we should be ok. According to the docs there
is no way of adding OIDS back to a table once they have been removed, so the
documented workaround for people already in this situation would have to be
something like:
BEGIN;
ALTER TABLE geometry_columns RENAME TO old_geometry_columns;
CREATE TABLE geometry_columns WITH OIDS AS (SELECT * FROM
old_geometry_columns);
DROP TABLE old_geometry_columns;
COMMIT;
(I gave this a quick test under 8.0 and it seemed to work for me)
Kind regards,
Mark.
------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT
T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk
More information about the postgis-users
mailing list