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 16962.95.458613.90797@giles.gnomon.org.uk
обсуждение исходный текст
Ответ на Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom> Yes.  The ISO design for the datatype is pretty brain-dead if
    Tom> you ask me --- the basic meaning of a data literal shouldn't
    Tom> be so dependent on context.

Arguably it's not, because the interval qualifier is an intrinsic (and
mandatory) part of the literal syntax, so the full ISO interval is
completely unambigous.

Where you run into problems is where you are casting strings to
intervals, in which case the way the string is parsed is (rather
unncessarily) dependent on the exact type of the interval.

This area certainly seems (over) complex, although you can see the
logic behind the design...

     -roy

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

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