Re: BUG #1517: SQL interval syntax is accepted by the parser,

Поиск
Список
Период
Сортировка
От Roy Badami
Тема Re: BUG #1517: SQL interval syntax is accepted by the parser,
Дата
Msg-id 16957.35903.590223.328021@giles.gnomon.org.uk
обсуждение исходный текст
Ответ на Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Roy Badami <roy@gnomon.org.uk>)
Список pgsql-bugs
Bruce> I guess my point is that we should allow:

    Bruce>     select interval '1' day '1' hour

    Bruce> as SQL standard and equavalent to:

Ah, I think you're misunderstanding what the SQL standard interval
literal syntax looks like.

It would be

   INTERVAL '1 1' DAY TO HOUR

Essentially the full syntax for a day-time interval is

   INTERVAL '1 2:03:04' DAY TO SECOND

and the full syntax of a year-month interval is

   INTERVA: '1-2' YEAR TO MONTH

but if you use a more restricted interval type you omit the fields
that aren't present in your interval type.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Следующее
От: Roy Badami
Дата:
Сообщение: Re: BUG #1517: SQL interval syntax is accepted by the parser,