Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on.
| От | Dickson S. Guedes |
|---|---|
| Тема | Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on. |
| Дата | |
| Msg-id | CAHHcrep2DLJhD4U+588qz=cdZVP10UDVg+zYRFW5ko0hd_2tHA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on. (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | 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 по дате отправления: