Re: Over-rigidity in recent to_timestamp() rewrite

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Over-rigidity in recent to_timestamp() rewrite
Date: 2009-03-15 19:15:15
Message-ID: 23325.1237144515@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan Jurd <direvus(at)gmail(dot)com> writes:
> Short version: I think using CC and AD/BC in combination with week
> dates would be downright weird, but I don't object to the patch.

I agree it's pretty weird, but I can't immediately see any reason that
it shouldn't (be allowed to) work. It would only get interesting if
you want to posit that ISO years shouldn't be based on the Gregorian
calendar that far back.

Some experimentation shows that it doesn't work, or at least doesn't
give sane results, in pre-8.4 branches; I have not traced the code to
make sure but I think this is because of the other bug I noted with
passing the wrong year variable to the isoweek code. I don't think
that's important enough to back-patch but it is worth getting it right
going forward.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-03-15 21:45:33 Re: Prepping to break every past release...
Previous Message Brendan Jurd 2009-03-15 02:00:07 Re: Over-rigidity in recent to_timestamp() rewrite