Skip site navigation (1) Skip section navigation (2)

Re: BUG #2885: to_char function

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Akio Iwaasa" <iwaasa(at)mxs(dot)nes(dot)nec(dot)co(dot)jp>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2885: to_char function
Date: 2007-01-12 15:53:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> If we make CC treat 2000 as being in the 20th century, what should YY
> do?

Report "00", IMVHO.  There's no year "0" so year 1 AD is "CC=1, YY=1".  Year
100 is "CC=1, YY=00", year 1000 is "CC=10, YY=00", year 2000 is "CC=20, YY=00"
(1900 is "CC=19, YY=00").  Centuries change on years ending with '01', years
ending with '00' are from the previous century :-)

But for millenia the thing is diffent... ;-)  (Just to complicate a bit more)

> Perhaps more to the point, how do these things act in Oracle?
> to_char is basically an Oracle-compatibility function so we should
> adopt their bugs :-(

I can't answer that...  But my expectations are like Akio's. 

Jorge Godoy      <jgodoy(at)gmail(dot)com>

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2007-01-12 20:06:25
Subject: Re: BUG #2885: to_char function
Previous:From: Tom LaneDate: 2007-01-12 15:46:38
Subject: Re: BUG #2885: to_char function

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group