Tom Lane wrote: > "Eugene M. Hutorny" <[EMAIL PROTECTED]> writes: > > SQL statemet > > SELECT EXTRACT(QUARTER FROM INTERVAL '1 day'); > > > > Returns: 1 > > Expected: 0 > > Why would you expect that? Quarters are numbered 1 through 4. > And it doesn't "always return 1": > > regression=# SELECT EXTRACT(QUARTER FROM INTERVAL '3 months'); > date_part > ----------- > 2 > (1 row)
SELECT EXTRACT(QUARTER FROM INTERVAL '200 days') gives 1. Why is that? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate