[postgis-devel] Typmod Enforcement
dfuhry at acm.org
Mon Aug 3 10:56:37 PDT 2009
Paul Ramsey wrote:
> PgSQL code for things like varchar() tosses errors on overlong input,
> except when the spare stuff is white space, in which case it truncates.
That's considered a weird artifact of the SQL standard, which the
postgres devs don't particularly like, IIRC.
> If I have a column with SRID = 4326 and try to insert an object with
> SRID = 26910. I can coerce it into the right SRID with no data loss. Do
> I insert or complain?
Knee-jerk reaction: complain. I get the feeling implicit transformation
between SRIDs could be the source of bugs. 8.3 dropped some casts
involving strings because of irreconcilable ambiguities in what the db
system should do. Now more to-string casts need to be explicit,
breaking some older queries. I'm not sure how strong the analogy is,
but I wouldn't want to see postgis have to make the same journey.
More information about the postgis-devel