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

Re: Postgresql likes Tuesday...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Rod Taylor <rbt(at)rbt(dot)ca>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgresql likes Tuesday...
Date: 2002-09-30 22:49:34
Message-ID: 12398.1033426174@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Hannu Krosing <hannu(at)tm(dot)ee> writes:
> On Tue, 2002-10-01 at 03:31, Tom Lane wrote:
>> I notice that 2001-12-31 is considered part of the first week of 2002,
>> which is also pretty surprising:

> There are at least 3 different ways to start week numbering:
> ...
> I suspect it depends on locale which should be used.

Perhaps.  But I think there are two distinct issues here.  One is
whether EXTRACT(week) is assigning reasonable week numbers to dates;
this depends on your convention for which day is the first of a week
as well as your convention for the first week of a year (both possibly
should depend on locale as Hannu suggests).  The other issue is what
to_date(...,'WWYYYY') should do to produce a date representing a week
number.  Shouldn't it always produce the first date of that week?
If not, what other conventions make sense?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Clark C. EvansDate: 2002-10-01 03:07:53
Subject: Re: Postgresql likes Tuesday...
Previous:From: Tom LaneDate: 2002-09-30 22:40:28
Subject: Re: (Fwd) Re: Any Oracle 9 users? A test please...

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