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 16956.22889.962007.979933@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>)
Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-bugs
Tom> Feel like hacking the code?

Hmm, in principle I might take a look some time; in reality it's
unlikely I'll have time any time soon...

There are some design issues involved, though.  If you have the type
modifier, do you isnist on SQL syntax in the string?

ie do you accept

   interval '1 day 1 hour' day to second

Personally I think it would be a bad idea to allow hybrid SQL/postgres
syntax like this.

IMHO, you should either write

   interval '1 day 1 hour'

(postgres style), or

   interval '1 1:00:00' day to second

(SQL style.)

Hmm, except writing the above has just raised another question.  Is
that what the postgres-ism really means (I think it does) or does it
mean

   interval '1 1' day to hour

Once you start distinguishing your interval types, does this become
important?  Actually, I can't immediately see a case where it would
matter, but that doesn't mean there isn't one...

    -roy

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

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