[postgis-devel] typmod order

Paul Ramsey pramsey at opengeo.org
Mon Jul 13 12:17:49 PDT 2009


I'm paying with typmod right now, and wonder what we think the
expected order of typmod arguments should be?

  geometry(srid, type, ndims)
  geometry(type, srid, ndims) ?

The reason I ask is because we can allow defaults by omitting an argument

  geometry(srid)
  geometry(srid, type)

which implies the most likely / frequent restriction should be first.
Which boils down to:

are people more likely to want to restrict type but not srid, or srid
but not type?

(I'm playing with this in the context of "geography" but I assume
similar concepts are going to apply. Based on the SQL server type, I
think it makes sense to have an associated SRID even for geography,
though the default srid for geography would be 4326 while the default
for geometry would be 0)

P.



More information about the postgis-devel mailing list