Re: Trigger on 'create table' ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Trigger on 'create table' ?
Date
Msg-id 24250.1035930787@sss.pgh.pa.us
Whole thread Raw
In response to Re: Trigger on 'create table' ?  (Paul Ramsey <pramsey@refractions.net>)
List pgsql-hackers
Paul Ramsey <pramsey@refractions.net> writes:
> We have a similar requirement for PostGIS.
> In order to meet the OpenGIS specification, we have to maintain a 
> GEOMETRY_COLUMNS table which includes an entry for every column in the 
> db which holds a spatial column. It would be ideal if we could have 
> triggers run on CREATE TABLE, DROP TABLE, and ALTER TABLE to watch for 
> the comings and goings of spatial columns and update GEOMETRY_COLUMNS 
> appropriately.

Couldn't you define GEOMETRY_COLUMNS as a view?  Seems a lot more
efficient than firing random triggers on every table operation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: float output precision questions
Next
From: Peter Bierman
Date:
Subject: CVS TOT fails to build on MacOSX 10.2.1