Re: Bug in to_timestamp().
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Alex Ignatov <a.ignatov@postgrespro.ru>
Cc: Bruce Momjian <bruce@momjian.us>, amul sul <sul_amul@yahoo.co.in>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-06-23T17:12:28Z
Lists: pgsql-hackers
On Thursday, June 23, 2016, Alex Ignatov <a.ignatov@postgrespro.ru> wrote: > Arguing just like that one can say that we don't even need exception like > "division by zero". Just use well-formed numbers in denominator... > Input data sometimes can be generated automagically. Without exception > throwing debugging stored function containing to_timestamp can be painful. > to_timestamp with its present behavior is, IMO, a poorly designed function that would never be accepted today. Concrete proposals for either fixing or deprecating (or both) are welcome. Fixing it should not cause unnecessary errors to be raised. My main point is that I'm inclined to deprecate it. My second point is if you are going to use this badly designed function you need to protect yourself. My understanding is that is not going to change for 9.6. David J.
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