[postgis-users] What's the Purpose of the Geometry_Columns Table?

Stephen Frost sfrost at snowman.net
Tue Sep 5 07:50:32 PDT 2006


* Paul Ramsey (pramsey at refractions.net) wrote:
> Yes, that is correct, GEOMETRY_COLUMNS is for the outside world.  It  
> would be nice if it could transparently auto-update as things happen  
> in SQL land, but we have not yet found a way to make that happen,  
> despite years of wanting it to.

I'm very interested in finding a way to make it transparent.  I'm
not entirely sure how everything fits together though.  I'd also like to
have it moved out of the 'public' schema and into someplace more
appropriate, though I'm not sure what impact that would have on the
applications which use it.

At first glance it looks like the geometry_columns could be based off
the pg_class, pg_attribute, and pg_type system tables by just looking
for tables which have columns of type 'geometry'.  I see that
geometry_columns also contains the number of dimensions, the srid, and
the type.  Are all three needed?  Can any of them be pulled from the
table directly?  Would they perhaps make more sense as individual types
instead of having just the one 'geometry' type?

I especially wonder about the last as the values in those columns appear
to be enforced through check constraints generally anyway...  Perhaps
what we need is an easy way to define new types and some appropriate
casting functions for them instead of attempting to munge all the,
apparently distinct, types into one.

	Thanks,

		Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060905/0ffe32a5/attachment.pgp>


More information about the postgis-users mailing list