Re: White space affecting parsing of range values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: White space affecting parsing of range values
Дата
Msg-id 15749.1588782813@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: White space affecting parsing of range values  (Thom Brown <thom@linux.com>)
Ответы Re: White space affecting parsing of range values
Список pgsql-general
Thom Brown <thom@linux.com> writes:
> I guess I should read the docs more carefully.  Shouldn't this be
> insignificant for a numeric value?

That would require the range code to know whether the subtype considers
whitespace significant (or perhaps more usefully, whether an all-spaces
input is valid).  We've stayed away from requiring range_in to have any
type-specific knowledge of that sort.

Still, you could argue that the rule ought to be "an empty or all-blank
value must be quoted to distinguish it from an omitted bound" rather than
"an empty value must be quoted to distinguish it from an omitted bound".

I'm not sure if we could get away with redefining that at this point,
though.  It looks like range_out quotes such values already, so maybe a
change wouldn't be totally catastrophic (in the sense of breaking dump
files).  But I still suspect there would be more people unhappy than
happy.

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: White space affecting parsing of range values
Следующее
От: Thom Brown
Дата:
Сообщение: Re: White space affecting parsing of range values