On Fri, 17 Jan 2020 at 17:52, Bruce Momjian 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 alread
On Thu, Jan 2, 2020 at 08:52:17AM -0500, Tom Lane wrote:
> Robert Haas writes:
> > On Wed, Jan 1, 2020 at 11:01 PM Tom Lane wrote:
> >> I see Randall Munroe has weighed in on this topic:
> >> https://xkcd.com/2249/
>
> > And the conclusion is ... the whole discussion is stupid?
>
> Well, it's
Robert Haas writes:
> On Wed, Jan 1, 2020 at 11:01 PM Tom Lane wrote:
>> I see Randall Munroe has weighed in on this topic:
>> https://xkcd.com/2249/
> And the conclusion is ... the whole discussion is stupid?
Well, it's not terribly useful anyway. Arguments founded on an
assumption that there
On Wed, Jan 1, 2020 at 11:01 PM Tom Lane wrote:
> Bruce Momjian writes:
> > Does the next decade start on 2020-01-01 or 2021-01-01?
>
> I see Randall Munroe has weighed in on this topic:
>
> https://xkcd.com/2249/
And the conclusion is ... the whole discussion is stupid?
--
Robert Haas
Enterpr
Bruce Momjian writes:
> Does the next decade start on 2020-01-01 or 2021-01-01?
I see Randall Munroe has weighed in on this topic:
https://xkcd.com/2249/
regards, tom lane
Andrew Dunstan writes:
> On Wed, Jan 1, 2020 at 3:05 AM Bruce Momjian wrote:
>> Does the next decade start on 2020-01-01 or 2021-01-01? Postgres says
>> it start on the former date:
>> ...
>> That seems inconsistent to me. /pgtop/src/backend/utils/adt/timestamp.c
>> has this C comment:
>>
>> *
On Wed, Jan 1, 2020 at 3:05 AM Bruce Momjian wrote:
>
> Does the next decade start on 2020-01-01 or 2021-01-01? Postgres says
> it start on the former date:
>
> SELECT EXTRACT(DECADE FROM '2019-01-01'::date);
> date_part
> ---
>201
>
> SELE
Funnily enough I was having a conversation with my wife on exactly this as I
opened your email.
If the Wikipedia article is to be trusted, the following seems fitting:
SELECT EXTRACT(ORDINAL DECADE FROM '2020-01-01'::date);
date_part
---
201
And the default:
SELECT