Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp) - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)
Date
Msg-id 37ed240d0901071932u16d7d3dl7623b0768379cdfb@mail.gmail.com
Whole thread Raw
In response to Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Jan 8, 2009 at 2:20 PM, Bruce Momjian <bruce@momjian.us> wrote:
> OK, what is the TODO?  It is more than AM/PM, right?
>

I see it happening in two stages.

Stage 1 is updating the AM/PM parse code to use the seq_search
technique, which may involve some minor refactoring around seq_search
itself.  This will get us the relaxed validation rules I was talking
about before (i.e., "am" is an acceptable spelling for "AM" and vice
versa).

Stage 2 is improving the error message reporting for all the bits that
use seq_search.

So I would probably make two TODOs, descriptions could be like:

* Relax validation for AM/PM markers in to_timestamp() by using seq_search
* Make to_timestamp() error messages more specific, and display the
actual value which caused the error.

Cheers,
BJ


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Null row vs. row of nulls in plpgsql
Next
From: Bruce Momjian
Date:
Subject: Re: Common Table Expressions applied; some issues remain