In response to Bruce Momjian :
> Well, I can easily make it do what you expect, and I don't see many
> error returns in that area of the code, so I just wrote a patch that
> does what you would expect rather than throw an error.
Well, that's great and better than an error, thx.
> test=> select to_date('2010-7', 'YYYY-Q');
> to_date
> ------------
> 2011-07-04
> (1 row)
Is this per SQL-Spec? I would expect an error for a quarter not in
(1,2,3,4).
But stop, now i see:
test=*# select to_date('2010-02-29', 'YYYY-MM-DD');
to_date
------------
2010-03-01
(1 row)
So it is maybe a congruously behavior ;-)
Regards, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99
In response to
Responses
pgsql-hackers by date
| Next: | From: Tom Lane | Date: 2010-03-03 06:00:26 |
| Subject: Re: Re: [COMMITTERS] pgsql: Instead of trying (and failing) to allow <<label>> at the end of |
| Previous: | From: Robert Haas | Date: 2010-03-03 05:26:29 |
| Subject: Re: renameatt() can rename attribute of index, sequence, ... |
pgsql-general by date
| Next: | From: Albe Laurenz | Date: 2010-03-03 08:11:00 |
| Subject: Re: [GENERAL] to_timestamp() and quarters |
| Previous: | From: Greg Fischer | Date: 2010-03-03 04:28:02 |
| Subject: Re: Trigger help - updates to column data with null values |