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

Stephen Frost sfrost at snowman.net
Tue Sep 5 09:46:39 PDT 2006


* Michael Fuhr (mike at fuhr.org) wrote:
> On Tue, Sep 05, 2006 at 11:38:15AM -0400, Stephen Frost wrote:
> > Having looked through the Postgres system tables a bit more though, why
> > aren't we just using 'atttypmod'?  Is is possible for custom types to
> > use that (I would have thought so...)?
> 
> I don't think that's currently possible.  The PostgreSQL TODO list
> has the following items:
> 
> * Allow user-defined types to specify a type modifier at table creation time
> * Allow user-defined types to accept 'typmod' parameters
> 
> http://www.postgresql.org/docs/faqs.TODO.html#section_4

hmm, I see.  Looks like there's been some work towards it and so it may
show up in 8.3.  No one mentioned PostGIS when the question came up of
multi-field typemods though, which seems like it would be a pretty
obvious case for it.

Can the PostGIS devs comment on if user-defined types with multi-field
typemods would be sufficient to replace geometry_columns and remove the
need for the ugly 'AddGeometryColumn()' functions and the various CHECK
constraints that go along with it?  (Note: geometry_columns could remain
in the system, it'd just be a view though)

I'd like to present the idea of:
create table mydata (
  wkb_geometry geometry(dims,srid,type)
);

to the Postgres Hackers list as a real-world use-case for multi-field
typemods, but only if the folks around here think it'd actually be
used..

	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/00ba9f95/attachment.pgp>


More information about the postgis-users mailing list