this date format thing. - Mailing list pgsql-general

From scott.marlowe
Subject this date format thing.
Date
Msg-id Pine.LNX.4.33.0304021316580.17785-100000@css120.ihs.com
Whole thread Raw
Responses Re: this date format thing.  (Dennis Gearon <gearond@cvc.net>)
List pgsql-general
OK, this has been bugging me for days.  One of the things I like about
Postgresql is that if you give it a data constraint it follows it.
Sometimes it even seems a bit overzealous, but I'd rather fix my code than
the user's data.

So, this thing with the date fields not being able to be forced into a
certain format is kinda bothersome to me.  No matter how much people argue
for the application code being the gate master, I'm much happier when I
know my database won't swallow things it shouldn't.

While I don't mind writing my own trigger to handle this, it seems like
for joe average user there should be some strict setting that can be
applied to force the dates to be in the right order format or to be
assumed to be bad and tossed out.

While situations where 04-02 would get put in when the user meant 02-04,
at least enough of the 02-13 cases would throw an error that the user
would know they had been doing something wrong along the way and would
hopefully go back and look at their data.

The way Postgresql deals with this kinda reminds me of the way MySQL deals
with data that's out of bounds.


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: select bla, AVG(asd) -- problem
Next
From: Hadley Willan
Date:
Subject: Joins and their efficiencies