Search Postgresql Archives

Re: extract (dow/week from date)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 20 Aug 2005, Tom Lane wrote:

> Clodoaldo Pinto <clodoaldo.pinto@xxxxxxxxx> writes:
> > I'm ordering by date just to show that sunday, the 0th day of the
> > week, is the last day of a given week, which is not what I need.
>
> extract(week) follows the ISO definition of week, which is pretty
> strange anyway, but in particular it says that weeks start on Monday.
> extract(dow) follows a different convention.  There's not a lot we
> can do about this --- we're certainly not going to change extract(week),
> and I can't see changing extract(dow) either.

Instead of change the existing ones, couldn't we add a new extract format
for "iso day of week" that returns 1-7 for monday-sunday that would be
consistent with the week definition?

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux