Skip site navigation (1) Skip section navigation (2)

Re: BUG #1518: Conversions to (undocumented) SQL year-month and

From: Roy Badami <roy(at)gnomon(dot)org(dot)uk>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Roy Badami <roy(at)gnomon(dot)org(dot)uk>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and
Date: 2005-03-23 23:56:09
Message-ID: 16962.537.2416.743847@giles.gnomon.org.uk (view raw or flat)
Thread:
Lists: pgsql-bugs
>>>>> "Bruce" == Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:

    >>  You also need to make EXTRACT do the right thing.
    >> 
    >> eg EXTRACT (MONTH FROM INTERVAL '1-1' YEAR TO MONTH) => 1
    >> 
    >> but
    >> 
    >> EXTRACT (MONTH FROM INTERVAL '13' MONTH) => 13
    >> 
    >> Ditto for day-time intervals, of course.

    Bruce> Uh, I think this already works fine for PG syntax, and I
    Bruce> assume once we support ANSI syntax it will work fine too:
	
Ok, so based on Tom's comments it sounds like this isn't a non-issue;
in fact it sounds like it will be very hard to make this work (at
least without changing the internal represnation of an interval).

So perhaps there should be something on the TODO list, even if only:

   o figure out whether it is feasible to make EXTRACT obey ISO
     standard semantics.

In response to

Responses

pgsql-bugs by date

Next:From: Roy BadamiDate: 2005-03-23 23:57:22
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous:From: Tom LaneDate: 2005-03-23 23:55:04
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group