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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Roy Badami <roy(at)gnomon(dot)org(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1518: Conversions to (undocumented) SQL year-month and
Date: 2005-03-24 03:49:48
Message-ID: 200503240349.j2O3nmm07497@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Roy Badami wrote:
> >>>>> "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.

I am thinking it isn't worth following the spec in this case.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew - Supernews 2005-03-24 09:14:25 Re: BUG #1552: massive performance hit between 7.4 and 8.0.1
Previous Message Bruce Momjian 2005-03-24 03:39:27 Re: BUG #1517: SQL interval syntax is accepted by the parser,