Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4] - Mailing list pgsql-hackers

From Paul Ramsey
Subject Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4]
Date
Msg-id 490D4511-5675-11D8-B42D-000393D33C2E@refractions.net
Whole thread Raw
In response to Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4] "permissions problem" with pl/pgsql function )  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4] "permissions problem" with pl/pgsql function )  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
One of the great annoyances of the OpenGIS spec is the requirement for 
a "geometry_columns" table, that has a list of all the spatial columns 
and a little bit of metadata on them (what type are they, what is the 
spatial reference system of their coordinates, what is their 
dimensionality).

Unfortunately, we have been reduced to "manually" maintaining this 
table through the mechanism of the "AddGeometryColumn" 
"DropGeometryColumn" functions. As you noted, we had some old scruft in 
there dating back to the pre-DROP COLUMN days. That's gone in the 
current version.

In an idea world though, we would construct the thing as a view, so 
that when you did a CREATE TABLE that included a geometry type, you 
would automatically get a row in geometry_columns. That requires a view 
on system tables though, and that just does not work. :/

Any thoughts on a nice implementation?

Paul

On Tuesday, January 20, 2004, at 09:07 AM, Tom Lane wrote:

> "Marc G. Fournier" <scrappy@postgresql.org> writes:
>> So, if we replace that with:
>> ALTER TABLE table_name ALTER column_name DROP NOT NULL; ?
>> should be good to go?  still not as clean as doing the straight DROP
>> COLUMN, but its a fast fix ...
>
> Yeah, that's what I'd do until the PostGIS guys can rethink things at a
> higher level.
>
>             regards, tom lane
>
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to 
> majordomo@postgresql.org
>     Paul Ramsey     Refractions Research     Email: pramsey@refractions.net     Phone: (250) 885-0632



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] log session end - again
Next
From: Tom Lane
Date:
Subject: Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4] "permissions problem" with pl/pgsql function )