Re: BUG #2599: AM/PM doesn't work in to_timestamp in

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Bugs for PostgreSQL <pgsql-bugs(at)postgresql(dot)org>
Cc: Josh Tolley <eggyknap(at)gmail(dot)com>
Subject: Re: BUG #2599: AM/PM doesn't work in to_timestamp in
Date: 2006-09-03 03:47:18
Message-ID: 200609030347.k833lIe09824@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

bruce wrote:
> Josh Tolley wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference: 2599
> > Logged by: Josh Tolley
> > Email address: eggyknap(at)gmail(dot)com
> > PostgreSQL version: 8.1.4
> > Operating system: Fedora Core 5
> > Description: AM/PM doesn't work in to_timestamp in the middle of a
> > string
> > Details:
> >
> > eggyknap=# select to_timestamp('30 Aug 06:01:03.223 PM 2006', 'DD Mon
> > HH:MI:SS.MS AM YYYY'), to_timestamp('30 Aug 2006 06:01:03.223 PM', 'DD Mon
> > YYYY HH:MI:SS.MS AM');
> > to_timestamp | to_timestamp
> > ---------------------------+----------------------------
> > 0001-08-30 18:01:03-08 BC | 2006-08-30 18:01:03.223-06
> >
> > This appears to happen when AM/PM isn't the last element in the string.
>
> Nice report. The attached patch fixes it, and will be in 8.2. I am not
> backpatching because someone might be relying on this behavior.

Sorry, I attached the wrong patch to the email. This is the right one.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/bjm/diff text/x-diff 1.5 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Douglas Toltzman 2006-09-04 00:01:02 Re: BUG #2607: Problems in pg_exec() [function.pg-exec / pg_fetch_object
Previous Message Bruce Momjian 2006-09-03 01:30:46 Re: BUG #2600: dblink compile with SSL missing