[postgis-users] update Geometry_columns

Mark Fenbers Mark.Fenbers at noaa.gov
Wed Jun 15 14:29:37 PDT 2005


It partially worked.

First off, it didn't like your syntax of the copying, so I used:
    SELECT * INTO geometry_columns_backup FROM geometry_columns;
instead.  (Maybe I just botched the syntax.  If it matters, let me know.) 

Then probe() only populated 7 of the 13 tables I am certain contain 
geometry columns.  All of my tables having geometry columns are given 
names starting with gis.  Listing them (/dt) gives a contiguous result 
(i.e., all my geometry tables are listed together).  Therefore, I was 
able to notice that the 7 records that DID get repopulated in 
geometry_columns were table names that also have a corresponding 
"sequence" of the same name(except for "_gid_seq" appended to the 
names).  Where these sequences came from is a mystery to me.  They are 
owned by 'postgres' whereas all my tables are owned by 'oper' and all my 
work is done as 'oper'.  There is one exception to the sequence 
correlation; I have only one table (gisxmrg) which contains POINT 
geometries, and it does NOT have a corresponding gisxmrg_gid_seq 
sequence relation, but yet it DID get repolpulated into the 
geometry_columns table.

I suppose I could try generating sequence relations for all my tables 
containing geometries and then rerun probe(), but I don't know how my 
sequence relations got there in the first place.

Any ideas what I can try next?

Mark

strk at refractions.net wrote:

>BEGIN;
>CREATE geometry_columns_backup AS SELECT * FROM  geometry_columns:
>DELETE FROM geometry_columns;
>SELECT probe_geometry_columns();
>
>.. do some checks mainly for dimensions comparing backup with new
>one ..
>
>COMMIT;
>
>The probe_geometry_columns() will not detect correct dimensions,
>everything else is done checking constraints. Actually since 1.0
>we do put a constraint on dimensions, so it could be possible to
>add dimensions detection as well.
>
>Note also that tables w/out strictly conformant constraints won't
>be correctly detected.
>
>Let me know if it worked :)
>
>--strk;
>
>On Tue, Jun 14, 2005 at 09:12:57PM -0400, Mark Fenbers wrote:
>  
>
>>All,
>>
>>I've made a few changes to my tables containing GEOMETRYs.  I deleted 
>>some, created new ones with SELECT INTO, and renamed one or two.  Now my 
>>Geometry_columns table shows tables that have been deleted, and doesn't 
>>show others that clearly exist.  Now, using Quantum GIS, I can only 
>>display data from tables in Geometry_columns.  Is there a magic command 
>>I could use to update this table to accurately reflect what in my DB 
>>now?  Or do I have to manually delete, update, or insert rows each time 
>>I dork with a geometry table?
>>
>>Mark
>>    
>>
>
>
>  
>
>>_______________________________________________
>>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 --------------
A non-text attachment was scrubbed...
Name: Mark.Fenbers.vcf
Type: text/x-vcard
Size: 283 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050615/f3ca5462/attachment.vcf>


More information about the postgis-users mailing list