All,
I’m seeing some odd behavior from the extract function. Any idea why extract would think January 3rd of next year is the 53rd week of the year?
Thanks
Ben
[bprimrose@primrose partitioning]$ psql
Null display is "¤".
Line style is unicode.
Output format is wrapped.
Timing is on.
psql (9.3.9)
Type "help" for help.
bprimrose@home=> select extract (week from '2016-01-03 00:01:00'::timestamp);
date_part
───────────
53
(1 row)
Time: 1.128 ms
bprimrose@home=> select version();
version
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
PostgreSQL 9.3.9 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6), 64-bit
(1 row)