Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Дата
Msg-id 22238.1226177414@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Список pgsql-hackers
Ron Mayer <rm_pg@cheapcomplexdevices.com> writes:
> Yes, at first glance I think that approach is better; but we'd need
> to make sure not to apply the rule too enthusiastically on traditional
> postgres intervals;

Well, of course we'd only apply it in SQL_STANDARD mode.  The idea here
is that intervalstyle helps us resolve an ambiguity about what the signs
are, more or less independently of syntactic details.  If you consider
that the issue issql standard: leading sign applies to all fieldspostgres: each field is independently signed
this applies perfectly well without any restrictions on syntax.

> In some ways I wonder if we should have 2 totally separate parsing
> one for the SQL standard ones, and one for the postgres.

No, I think we want the style to be a hint for resolving ambiguous
cases, not to cause complete failure if the input doesn't conform to the
style.  That's certainly how DateStyle has always worked.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle