> 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

Reply via email to