Re: Date input changed in 7.4 ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Date input changed in 7.4 ?
Date
Msg-id 28860.1061915517@sss.pgh.pa.us
Whole thread Raw
In response to Re: Date input changed in 7.4 ?  ("Mendola Gaetano" <mendola@bigfoot.com>)
Responses Re: Date input changed in 7.4 ?
Re: Date input changed in 7.4 ?
List pgsql-hackers
"Mendola Gaetano" <mendola@bigfoot.com> writes:
> May I also suggest to change in date.c the 3 generic error:
>     "invalid input syntax for date: "
> with more comprensive messages ?

That's easier said than done; there are enough different valid syntaxes
that it's not always obvious what the user's intent was.  (Indeed, the
reason for this change was exactly that the code was guessing wrong too
much of the time.)  See also the thread at 
http://archives.postgresql.org/pgsql-bugs/2003-08/msg00113.php

I'm currently thinking about reporting "invalid syntax" if
ParseDateTime() fails and "invalid field value" if the various Decode()
routines fail, but I'm quite unsure that that will be helpful ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jenny -"
Date:
Subject: row level locks
Next
From: Andrew Dunstan
Date:
Subject: Re: Date input changed in 7.4 ?