Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)
| От | Brendan Jurd |
|---|---|
| Тема | Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp) |
| Дата | |
| Msg-id | 37ed240d0809261857n4f128e38mb3e8069765a82781@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp) (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Meridiem markers (was: [BUGS] Incorrect
"invalid AM/PM string" error from to_timestamp)
|
| Список | pgsql-hackers |
On Sat, Sep 27, 2008 at 4:08 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Alex Hunsaker" <badalex@gmail.com> writes:
>> However that still leaves the original complaint around (at least IMHO):
>
>> select to_timestamp('AN', 'AM');
>> ERROR: invalid AM/PM string
>
>> select to_timestamp('11:47 PM 27 Sep a2008', 'HH:MI PM DD Mon YYYY');
>> ERROR: invalid value for "YYYY" in source string
>
> Yeah, it would be a lot better if it said
>
> ERROR: invalid value for "YYYY": "a2008"
>
> The DETAIL is good too, but it's no substitute for showing the exact
> substring that the code is unhappy about.
>
I agree. And with my proposed changes to the meridiem/era marker
code, it will be much easier to improve the error messages in a
consistent way.
I'll work on a patch for the Nov commitfest.
Cheers,
BJ
В списке pgsql-hackers по дате отправления: