this date format thing.

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: this date format thing.
Date: 2003-04-02 20:23:45
Message-ID: Pine.LNX.4.33.0304021316580.17785-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hadley Willan 2003-04-02 20:39:37 Joins and their efficiencies
Previous Message Stephan Szabo 2003-04-02 19:59:04 Re: select bla, AVG(asd) -- problem