[postgis-devel] typmod order

Chris Hodgson chodgson at refractions.net
Mon Jul 13 12:55:52 PDT 2009


I like the (srid, type, ndims) order. Even if SRID isn't the most common 
restriction, this way we force it to be, which IMHO is for the "greater 
good". That is also the same order is as the existing addGeometryColumn 
function, so it will be familiar to users.

Chris

Paul Ramsey wrote:
> 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.
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>   




More information about the postgis-devel mailing list