Re: Bug in to_timestamp().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: amul sul <sul_amul(at)yahoo(dot)co(dot)in>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in to_timestamp().
Date: 2016-06-13 16:12:24
Message-ID: 20932.1465834344@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

amul sul <sul_amul(at)yahoo(dot)co(dot)in> writes:
> It's look like bug in to_timestamp() function when format string has more whitespaces compare to input string, see below:

No, I think this is a case of "input doesn't match the format string".

As a rule of thumb, using to_timestamp() for input that could be parsed
just fine by the standard timestamp input function is not a particularly
good idea. to_timestamp() is meant to deal with input that is in a
well-defined format that happens to not be parsable by timestamp_in.
This example doesn't meet either of those preconditions.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-13 16:25:44 Re: Bug in to_timestamp().
Previous Message Tom Lane 2016-06-13 16:07:52 Re: ERROR: ORDER/GROUP BY expression not found in targetlist