[postgis-users] how to keep geometry_columns in sync with tables and views

Ben Madin lists at remoteinformation.com.au
Wed May 18 17:50:35 PDT 2011


Ge,

Try 

    SELECT Populate_Geometry_Columns();

http://postgis.refractions.net/docs/Populate_Geometry_Columns.html

which promises to truncate the geometry columns table first, then rebuild it.

cheers

Ben



On 18/05/2011, at 8:05 PM, G. van Es wrote:

> Hi Edward,
> 
> This will not work because this function doesn't do anything with views. Also stale records aren't removed.
> 
> Ge
> 
> --- On Wed, 5/18/11, Edward Mac Gillavry <emacgillavry at hotmail.com> wrote:
> 
> From: Edward Mac Gillavry <emacgillavry at hotmail.com>
> Subject: Re: [postgis-users] how to keep geometry_columns in sync with tables and views
> To: postgis-users at postgis.refractions.net
> Date: Wednesday, May 18, 2011, 4:57 AM
> 
> Hi Ge,
> 
> You may want to check Probe_Geometry_Columns (http://postgis.refractions.net/docs/Probe_Geometry_Columns.html).
> 
> Kind regards,
> 
> Edward
> 
> 
> 
> Date: Wed, 18 May 2011 04:38:51 -0700
> From: gves2000 at yahoo.com
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] how to keep geometry_columns in sync with tables	and views
> 
> Hi All,
> 
> We have a lot of tables and views updated, or better said, replaced on a daily basis. We have seen that under certain conditions (which are unclear) entries of the geometry_columns table are removed. So a mismatch occurs so now and then resulting in showing either no data or being very slow when an application has to do a table scan to obtain the geometry type.
> 
> What I like to have is a procedure which checks all tables and views against the geometry_columns table and makes if necessary the right corrections.
> 
> Before inventing the wheel again, does anyone know if this procedure already exist or knows perhaps another/better way to achieve this? 
> 
> Thanks in advance,
> 
> Ge
> 
> 
> 
> 
> 
> _______________________________________________ postgis-users mailing list postgis-users at postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110519/67d18c48/attachment.html>


More information about the postgis-users mailing list