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

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Meridiem markers (was: [BUGS] Incorrect "invalid AM/PM string" error from to_timestamp)
Date: 2009-01-25 21:32:00
Message-ID: 34d269d40901251332g2fabbecax46cee35b81fe4566@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 19, 2009 at 15:26, Brendan Jurd <direvus(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2009-01-25 21:40:34 Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle
Previous Message Alvaro Herrera 2009-01-25 21:20:00 Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle