[postgis-devel] Typmod Again

Paul Ramsey pramsey at opengeo.org
Wed Jul 22 14:14:24 PDT 2009


OK, working into the typmod implementation, I found this interesting quirk.
Before, I was talking about

geometry(srid, type, dims)

But, in fact, dims is implicit in type, and you probably want that.
IE, 'POINTZM' (as defined in Table 4 of SFSQL 1.2.0) is a valid type,
and implies a dimensionality of four. We want our types to include
that information so we can distinguish between POINTM and POINTZ,
otherwise, we could define geometry(4326, POINT, 3) and be able to
accept both POINTM and POINTZ.

So that brings us down to just

geometry(srid, type)

Anything I'm missing?

P



More information about the postgis-devel mailing list