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

2015-08-15 Thread David Fetter
On Fri, Aug 14, 2015 at 10:06:22PM -0300, Dickson S. Guedes wrote: > 2015-08-14 21:32 GMT-03:00 Gavin Flower : > ... > > So semesters don't appear to align with normal half year boundaries. > > Interesting links, thanks! > > Which sounds better for a native English: 'half', 'halfyear'? > > For e

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

2015-08-14 Thread Dickson S. Guedes
2015-08-15 0:55 GMT-03:00 Tom Lane : > 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 me

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

2015-08-14 Thread Tom Lane
"David G. Johnston" writes: > On Friday, August 14, 2015, Dickson S. Guedes wrote: >> The term is used in a school or college to represent a half-year. > I quite dislike semester because of its connotations in education and the > fact that actual semesters do not align with calendar halves. It'

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

2015-08-14 Thread Robert Haas
On Fri, Aug 14, 2015 at 8:40 PM, David G. Johnston wrote: > Tbh, "quarter in (1,2)" does not seem that problematic... Yeah. It's so easy to compute the half from the quarter (or even from the month) that I can't see adding this. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Ente

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

2015-08-14 Thread David G. Johnston
​On Fri, Aug 14, 2015 at 6:11 PM, Dickson S. Guedes wrote: > 2015-08-14 21:40 GMT-03:00 David G. Johnston : > > On Friday, August 14, 2015, Dickson S. Guedes > wrote: > >> > >> > >> The term is used in a school or college to represent a half-year. > >> Actually it could be evaluated from a date

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

2015-08-14 Thread Dickson S. Guedes
2015-08-14 21:40 GMT-03:00 David G. Johnston : > On Friday, August 14, 2015, Dickson S. Guedes wrote: >> >> >> 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 sinc

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

2015-08-14 Thread Gavin Flower
On 15/08/15 13:06, Dickson S. Guedes wrote: 2015-08-14 21:32 GMT-03:00 Gavin Flower : ... So semesters don't appear to align with normal half year boundaries. Interesting links, thanks! Which sounds better for a native English: 'half', 'halfyear'? For example: SELECT date_trunc('halfyear',

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

2015-08-14 Thread Dickson S. Guedes
2015-08-14 21:32 GMT-03:00 Gavin Flower : ... > So semesters don't appear to align with normal half year boundaries. Interesting links, thanks! Which sounds better for a native English: 'half', 'halfyear'? For example: > SELECT date_trunc('halfyear', current_date); date_trunc ---

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

2015-08-14 Thread David G. Johnston
On Friday, August 14, 2015, Dickson S. Guedes wrote: > > 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

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

2015-08-14 Thread Gavin Flower
On 15/08/15 11:58, Dickson S. Guedes wrote: 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(semes

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

2015-08-14 Thread Dickson S. Guedes
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 --