Hello hackers,
* Description
This patch is a proposal to allow the use of word 'semester' to
extract it from date in functions like EXTRACT, DATE_PART, etc and
adds the letter 'S' to format the date output in to_char.
** Example
SELECT EXTRACT(semester FROM DATE '2015-07-07');
date_part
----------- 2
* Motivation
The term is used in a school or college to represent a half-year.
Actually it could be evaluated from a date using some math with
'quarter' but could not be extracted from date since the API to define
a "reserved word" for EXTRACT is in the core, rather than in SQL.
* Syntax
I'm using the word 'semester' since it is common in college and school
but I wondering if it should be other word (like 'halfyear', for
example)
Is this a feature that worth?
BTW, I'll put this in the commit fest (2015-09).
Thanks!
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://github.com/guedes - http://guedesoft.net
http://www.postgresql.org.br