The following bug has been logged online:
Bug reference: 3624
Logged by: Eugene M. Hutorny
Email address: eugene@ksf.kiev.ua
PostgreSQL version: 8.2.4
Operating system: freebsd6.2
Description: EXTRACT(QUARTER FROM INTERVAL) always returns 1
Details:
Tested on PostgreSQL Versions:
PostgreSQL 8.2.4 on i386-portbld-freebsd6.2, compiled by GCC cc (GCC) 3.4.6
[FreeBSD] 20060305
PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2
(mingw-special)
SQL statemet
SELECT EXTRACT(QUARTER FROM INTERVAL '1 day');
Returns: 1
Expected: 0
Or: ERROR: interval units "quarter" not supported