Re: Decade indication - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: Decade indication
Date
Msg-id CAMsGm5cSWUuFZ+we-9DPaq91XLZ27rZkxgkEBxmsPSHw+U3ApA@mail.gmail.com
Whole thread Raw
In response to Re: Decade indication  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Fri, 17 Jan 2020 at 17:52, Bruce Momjian <bruce@momjian.us> wrote:
 
I assume there is enough agreement that decades start on 20X0 that we
don't need to document that Postgres does that.

I think the inconsistency between years, decades, centuries, and millenia is worthy of documentation. In fact, it already is for EXTRACT:


It describes decade as "The year field divided by 10", whereas for century and millennium it refers to centuries and millennia beginning in '01 years. I think if I were designing EXTRACT I would probably have decades follow the pattern of century and millennium, mostly because if somebody wants year / 10 they can just write that. But I am, to say the least, not proposing any modifications to this particular API, for multiple reasons which I'm sure almost any reader of this list will agree with.

pgsql-hackers by date:

Previous
From: Egor Rogov
Date:
Subject: Re: BRIN cost estimate breaks geometric indexes
Next
From: Michael Paquier
Date:
Subject: Re: PATCH: standby crashed when replay block which truncated instandby but failed to truncate in master node