Re: [HACKERS] Re: Proposed changing the definition of decade for date_trunc and extract

2014-08-01 Thread Mike Swanson
On Sat, 2014-08-02 at 15:15 +1200, Gavin Flower wrote: > Since there was no year zero: then it follows that the first decade > comprises years 1 to 10, and the current Millennium started in 2001 - or > am I being too logical??? :-) This is pretty much the reason I'm sending this patch, because

Re: [HACKERS] Re: Proposed changing the definition of decade for date_trunc and extract

2014-08-01 Thread David Johnston
On Fri, Aug 1, 2014 at 8:15 PM, Gavin Flower wrote: > On 02/08/14 12:32, David G Johnston wrote: > >> >> Any supporting arguments for 1-10 = 1st decade other than technical >> perfection? I guess if you use data around and before 1AD you care about >> this more, and rightly so, but given sound a

Re: [HACKERS] Re: Proposed changing the definition of decade for date_trunc and extract

2014-08-01 Thread Gavin Flower
On 02/08/14 12:32, David G Johnston wrote: Mike Swanson wrote For a long time (since version 8.0), PostgreSQL has adopted the logical barriers for centuries and millenniums in these functions. The calendar starts millennium and century 1 on year 1, directly after 1 BC. Unfortunately decades are

Re: [HACKERS] Re: Proposed changing the definition of decade for date_trunc and extract

2014-08-01 Thread Josh Berkus
On 08/01/2014 05:32 PM, David G Johnston wrote: > Any supporting arguments for 1-10 = 1st decade other than technical > perfection? I guess if you use data around and before 1AD you care about > this more, and rightly so, but given sound arguments for both methods the > one more useful to more use

[HACKERS] Re: Proposed changing the definition of decade for date_trunc and extract

2014-08-01 Thread David G Johnston
Mike Swanson wrote > For a long time (since version 8.0), PostgreSQL has adopted the logical > barriers for centuries and millenniums in these functions. The calendar > starts millennium and century 1 on year 1, directly after 1 BC. > Unfortunately decades are still reported rather simplistically