Re: Decade indication

2019-12-31 Thread Glyn Astill
 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 EXTRACT(CARDINAL DECADE FROM '2020-01-01'::date);
    date_part
    ---
          202

 On Tuesday, 31 December 2019, 16:36:02 GMT, 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
    
    SELECT EXTRACT(DECADE FROM '2020-01-01'::date);
    date_part
    ---
          202

but the _century_ starts on 2001-01-01, not 2000-01-01:

    SELECT EXTRACT(CENTURY FROM '2000-01-01'::date);
    date_part
    ---
            20
    
    SELECT EXTRACT(CENTURY FROM '2001-01-01'::date);
    date_part
    ---
            21

That seems inconsistent to me.  /pgtop/src/backend/utils/adt/timestamp.c
has this C comment:

    * what is a decade wrt dates? let us assume that decade 199
    * is 1990 thru 1999... decade 0 starts on year 1 BC, and -1
    * is 11 BC thru 2 BC...

FYI, these two URLs suggest the inconsistency is OK:

    https://www.timeanddate.com/calendar/decade.html
    https://en.wikipedia.org/wiki/Decade

-- 
  Bruce Momjian          http://momjian.us
  EnterpriseDB                            http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


  

Re: Opossum vs. float4 NaN

2019-01-27 Thread Glyn Astill
  >> On Saturday, 26 January 2019, 16:00:24 GMT, Tom Lane  
wrote:  >>
>> I'm thinking we should regretfully retire opossum, unless there's
>> a software update available for it that fixes this bug.
I'm happy to update opossum to see if the issue goes away; likewise I'm just as 
happy to retire it completely.  It'll still come online occasionally 
regardless, so makes no difference. 

I guess the main question is; does anybody care about builds on a 20 year old 
netbsd/mipsel dinosaur?  I noticed there are now mips64el and mips64eb 
build-farm members.