From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: to_char() accepting invalid dates?
Date: Wed, 20 Jul 2011 09:15:15 +0200
Message-ID: <j05v9d$v85$1@dough.gmane.org> (raw)
In-Reply-To: <201107200103.p6K13ix10517@momjian.us>
References: <j03psc$aof$1@dough.gmane.org>
<201107200103.p6K13ix10517@momjian.us>
Bruce Momjian, 20.07.2011 03:03:
>>> Well, to_char() is based on Oracle's to_char(). How does Oracle handle
>>> such a date?
>>
>> Oracle throws an error for the above example:
>>
>> SQL> select to_date('20110231', 'YYYYMMDD') from dual;
>> select to_date('20110231', 'YYYYMMDD') from dual
>> *
>> ERROR at line 1:
>> ORA-01839: date not valid for month specified
>>
>> SQL>
>
> OK, it's a bug then. Let me see if I can find a fix for it.
Thanks for the info. I didn't know it was modelled after the Oracle implementation.
Regards
Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: to_char() accepting invalid dates?
In-Reply-To: <j05v9d$v85$1@dough.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox