Re: Bug in to_timestamp().
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: amul sul <sul_amul@yahoo.co.in>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-06-13T16:12:24Z
Lists: pgsql-hackers
amul sul <sul_amul@yahoo.co.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
Commits
-
Improve behavior of to_timestamp()/to_date() functions
- cf984672427e 12.0 landed
-
Implement TZH and TZM timestamp format patterns
- 11b623dd0a2c 11.0 cited
-
as attache of this mail is patch (to the main tree) with to_char's
- b866d2e2d794 7.1.1 cited