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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: BUG #1518: Conversions to (undocumented) SQL year-month and
Дата
Msg-id 200503232248.j2NMmu425952@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: BUG #1518: Conversions to (undocumented) SQL year-month and  (Roy Badami <roy@gnomon.org.uk>)
Ответы Re: BUG #1518: Conversions to (undocumented) SQL year-month and  (Roy Badami <roy@gnomon.org.uk>)
Список pgsql-bugs
Roy Badami wrote:
>     Bruce> Here is an email stating it is implementation defined:
>
>     Bruce>     http://archives.postgresql.org/pgsql-bugs/2005-03/msg00162.php
>
> Hmm, looks like I'm mistaken, then.  In fact the "whether to truncate
> or round" bit suggests you should do one or the other, rather than
> raise an exception.
>
> Will have to take a look at the spec when I get a moment...

OK, TODO updated:

        o Round or truncate values to the requested precision, e.g.
          INTERVAL '11 months' AS YEAR should return one or zero

The full TODO section is:

* Add ANSI INTERVAL handling
        o Add support for day-time syntax, INTERVAL '1 2:03:04'
          DAY TO SECOND
        o Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH
        o Interpret syntax that isn't uniquely ANSI or PG, like '1:30' or
          '1' as ANSI syntax, e.g. interpret '1:30' MINUTE TO SECOND as
          '1 minute 30 seconds'
        o Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
          INTERVAL MONTH), and this should return '12 months'
        o Round or truncate values to the requested precision, e.g.
          INTERVAL '11 months' AS YEAR should return one or zero
        o Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Roy Badami
Дата:
Сообщение: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1518: Conversions to (undocumented) SQL year-month and