Re: Incorrect "invalid AM/PM string" error from to_timestamp - Mailing list pgsql-bugs

From Alex Hunsaker
Subject Re: Incorrect "invalid AM/PM string" error from to_timestamp
Date
Msg-id 34d269d40809251505r6ac84315ncde79e884bbb5fae@mail.gmail.com
Whole thread Raw
In response to Re: Incorrect "invalid AM/PM string" error from to_timestamp  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Incorrect "invalid AM/PM string" error from to_timestamp
Re: Incorrect "invalid AM/PM string" error from to_timestamp
List pgsql-bugs
On Thu, Sep 25, 2008 at 10:22 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> A likely bet is that this is caused by use of uninitialized memory,
> which happens to have garbage rather than zeroes in it the second
> time through.

Yep both DCH_MC and DCH_US were going past the end of the string
because they still added the length of the string where
from_char_parse_int_len takes care of that for us now...

The attach patch fixes it and tries to improve the "invalid AM/PM
string" a bit by showing the string.

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #4436: (E'\\' LIKE E'\\') => f
Next
From: "Alex Hunsaker"
Date:
Subject: Re: Incorrect "invalid AM/PM string" error from to_timestamp