| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Brendan Jurd <direvus(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alex Hunsaker <badalex(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp) |
| Date: | 2009-01-08 03:10:39 |
| Message-ID: | 200901080310.n083AdG13000@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Brendan Jurd wrote:
> On Sat, Sep 27, 2008 at 4:08 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Alex Hunsaker" <badalex(at)gmail(dot)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.
Brendan, did you ever complete this patch?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2009-01-08 03:16:35 | Re: Null row vs. row of nulls in plpgsql |
| Previous Message | KaiGai Kohei | 2009-01-08 02:55:08 | Re: Updates of SE-PostgreSQL 8.4devel patches (r1389) |