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

From Alex Hunsaker
Subject Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)
Date
Msg-id 34d269d40901251332g2fabbecax46cee35b81fe4566@mail.gmail.com
Whole thread Raw
In response to Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)  (Brendan Jurd <direvus@gmail.com>)
List pgsql-hackers
On Mon, Jan 19, 2009 at 15:26, Brendan Jurd <direvus@gmail.com> wrote:
> From the better-late-than-never department, comes a patch to improve
> the handling of AM/PM and AD/BC markers in to_timestamp(), and up the
> ante on error reporting for various kinds of invalid input.

Ok cool I tried this out and gave it a look over.  Looks good to me,
only a few nits below:

-the various (only moved not added)
strncpy(...)
copy[len]  = '\0';

just use strlcpy?

-it seemed we were going to do the error messages the other way around
"invalid value for "YYYY" in "a009"
instead of
"invalid value "a009" for "YYYY"

but I think I like the latter (what you did in your patch) better
anyways... so never mind


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle
Next
From: Jaime Casanova
Date:
Subject: Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle