Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4]

From: Paul Ramsey <pramsey(at)refractions(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4]
Date: 2004-02-03 18:17:54
Message-ID: 490D4511-5675-11D8-B42D-000393D33C2E@refractions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)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(at)postgresql(dot)org
>
Paul Ramsey
Refractions Research
Email: pramsey(at)refractions(dot)net
Phone: (250) 885-0632

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2004-02-03 18:18:47 Re: Idea about better configuration options for sort
Previous Message Andrew Dunstan 2004-02-03 18:10:46 Re: [PATCHES] log session end - again