Week numbers and years

Поиск
Список
Период
Сортировка
От Brage
Тема Week numbers and years
Дата
Msg-id 20030625140510.A65650@sisyfos.zoo.uib.no
обсуждение исходный текст
Ответы Re: Week numbers and years  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-hackers
A minor feature request:

PostgreSQL supports ISO-8601 week numbers with the syntax EXTRACT(WEEK FROM
timestamp) or TO_CHAR(timestamp,'IW'). There is, however, no easy way to
extract the year corresponding to the week number.

Since ISO weeks may overlap year boundaries, this makes the week number
functionality nearly unusable in aggregate queries. (e.g. both EXTRACT(WEEK
FROM timestamp '2002-01-01') and EXTRACT(WEEK FROM timestamp '2002-12-31')
returns 1.)

A way to extract the year-of-week would make the extract(week from
date)-functionality a lot more useful.

-- 
Brage Førland



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Enke, Michael"
Дата:
Сообщение: Re: again: Bug #943: Server-Encoding from EUC_TW
Следующее
От: xoror@infuse.org
Дата:
Сообщение: Re: lru cache replacement