Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on. - Mailing list pgsql-hackers

From Dickson S. Guedes
Subject Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on.
Date
Msg-id CAHHcrep2DLJhD4U+588qz=cdZVP10UDVg+zYRFW5ko0hd_2tHA@mail.gmail.com
Whole thread Raw
In response to Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2015-08-15 0:55 GMT-03:00 Tom Lane <tgl@sss.pgh.pa.us>:
> I don't think we should accept a patch along this line, because it assigns
> a very specific meaning to "semester" that does not square all that well
> with real-world usage.

I agree that "semester" was not nice, the real meaning is "half" or
"halfyear" as mentioned in other messages. That's it, I was proposing
the extraction of the first or second half year using a specific word
like in:
   select extract('halfyear' from date '2015-08-15')); or   select date_trunc('halfyear', date '2015-08-15');

rather than trying to overloading `date_part` with a UDF or
calculating half like:
   select ceil(date_part('quarter', date '2015-08-15') / 2);


BTW, I feel that I have enough feedback to set patch as rejected.

Thank you for your time.
-- 
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://github.com/guedes - http://guedesoft.net
http://www.postgresql.org.br



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: why can the isolation tester handle only one waiting process?
Next
From: Tom Lane
Date:
Subject: Re: why can the isolation tester handle only one waiting process?