Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on.

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pg-dev <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on.
Date: 2015-08-15 04:48:46
Message-ID: CAHHcrep2DLJhD4U+588qz=cdZVP10UDVg+zYRFW5ko0hd_2tHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-08-15 0:55 GMT-03:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(at)guedesoft(dot)net - skype: guediz
http://github.com/guedes - http://guedesoft.net
http://www.postgresql.org.br

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-08-15 05:16:41 Re: why can the isolation tester handle only one waiting process?
Previous Message Robert Haas 2015-08-15 04:17:33 Re: why can the isolation tester handle only one waiting process?