Re: [GENERAL] to_date() and invalid dates

2014-01-21 Thread Albe Laurenz
Thomas Kellerer wrote: I asked this a while back already: select to_date('2013-02-31', '-mm-dd'); will not generate an error (unlike e.g. Oracle) This is by design. When I previously asked this question the answer as this is based on Oracle's to_date():

[GENERAL] to_date() and invalid dates

2014-01-20 Thread Thomas Kellerer
Hi, I asked this a while back already: select to_date('2013-02-31', '-mm-dd'); will not generate an error (unlike e.g. Oracle) However in the release notes of 9.2.3[1] it is mentioned that - Reject out-of-range dates in to_date() (Hitoshi Harada) I tried the above statement using

Re: [GENERAL] to_date() and invalid dates

2014-01-20 Thread Albe Laurenz
Thomas Kellerer wrote: I asked this a while back already: select to_date('2013-02-31', '-mm-dd'); will not generate an error (unlike e.g. Oracle) This is by design. However in the release notes of 9.2.3[1] it is mentioned that - Reject out-of-range dates in to_date() (Hitoshi

Re: [GENERAL] to_date() and invalid dates

2014-01-20 Thread Michael Nolan
Thomas, try this: '2013-02-31'::date -- Mike Nolan On Mon, Jan 20, 2014 at 7:44 AM, Thomas Kellerer spam_ea...@gmx.net wrote: Hi, I asked this a while back already: select to_date('2013-02-31', '-mm-dd'); will not generate an error (unlike e.g. Oracle) However in the release

Re: [GENERAL] to_date() and invalid dates

2014-01-20 Thread Thomas Kellerer
Albe Laurenz, 20.01.2014 15:29: I asked this a while back already: select to_date('2013-02-31', '-mm-dd'); will not generate an error (unlike e.g. Oracle) This is by design. When I previously asked this question the answer as this is based on Oracle's to_date():

Re: [GENERAL] to_date() and invalid dates

2014-01-20 Thread Thomas Kellerer
Michael Nolan, 20.01.2014 16:17: Thomas, try this: '2013-02-31'::date Thanks, I know this works, but this can't be used if you have a non-ISO date string -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] to_date() and invalid dates

2014-01-20 Thread Adrian Klaver
On 01/20/2014 07:32 AM, Thomas Kellerer wrote: Michael Nolan, 20.01.2014 16:17: Thomas, try this: '2013-02-31'::date Thanks, I know this works, but this can't be used if you have a non-ISO date string Hmm: test= SELECT '2013-02-31'::date; ERROR: date/time field value out of range: