dbTalk Databases Forums  

Re: [BUGS] IYYY: unexpected behaviour

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] IYYY: unexpected behaviour in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: [BUGS] IYYY: unexpected behaviour - 10-12-2006 , 12:02 PM






Zubkovsky, Sergey wrote:
Quote:
SELECT to_char( '2006-01-01'::timestamp, 'IYYY-MM-DD' ) AS strange,
to_char( '2006-01-02'::timestamp, 'IYYY-MM-DD' ),
to_char( '2006-01-01'::timestamp, 'YYYY-MM-DD' );

does produce unexpected result for column 'strange':

strange | to_char | to_char
------------+------------+------------
2005-01-01 | 2006-01-02 | 2006-01-01
This is correct. January 1, 2006 belongs to 2005 in this "ISO" way of
counting.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.