Re: Output of date_part('quarter', date)

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: Output of date_part('quarter', date)
Дата
Msg-id Pine.LNX.3.96.1010104090126.14878A-100000@ara.zf.jcu.cz
обсуждение исходный текст
Ответ на Output of date_part('quarter', date)  ("Denis V. Osadchy" <osadchy@turbo.nsk.su>)
Список pgsql-bugs
> I tried to use function date_part('quarter', date) in query and I have
> got wrong results - for first quarter I've got all rows from 01.01 to
> 31.03
> for second - from from 01.04 to 31.07 (!!!)
> for third  - from from 01.08 to 30.11 (!!!)
> for forth  - from from 01.12 to 31.12 (!!!)
> -----------------------
> PostgreSQL 7.0.2 on i386-pc-bsdi4.0.1, compiled by gcc 2.7.2.1
> -----------------------

 until bug will fix, in 7.0.2 you can use:

    ... WHERE to_char(field, 'YYYY Q') = '2000 1'

 (it's - may be - faster than 2x date_part())

            Karel

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: dump of functions does not handle backslashes correctly
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: subselects doesn't work in v7.0.3