[postgis-devel] Re: [postgis-users] usage of AddGeometryColumn etc.

strk strk at keybit.net
Tue Jun 1 09:33:42 PDT 2004


On Tue, Jun 01, 2004 at 09:12:04AM -0700, David Blasby wrote:
> strk wrote:
> 
> >Again, triggers on system tables are not seen with simpaty.
> >If you guys write down every occurrence of the stale record problem
> >we can find out an ad-hoc solution (like adding check in AddGeometryColumn
> >which I think is the one function making noise about it).
> >
> >--strk;
> >
> >PS: I've just committed changes in the postgis.sql.in file to make
> >    find_extent and build_histogram2d (and update_geometry_stats)
> >     better support schema in the way you suggested.
> 
> One way would be to make a geometry_columns_meta table with all the 
> information in it (like we have now).  Then have geometry_columns be a 
> view that crosses the system table with the geometry_columns_meta table. 
>  This will hide any "stale" rows.
> 
> Alternately, you could have AddGeometryColumn() behave smarter - it 
> should automagically delete any stale columns in the current 
> geometry_columns table (or the future geometry_columns_meta table).

I've modified AddGeoemtryColumn() to delete any existing record
with the same catalogue,schema,table,column values as the
ones being added. This will avoid primary key constraint
from being violated.

--strk;

> 
> dave
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list