Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE
Дата
Msg-id 2583527.1665019226@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE  (Bryn Llewellyn <bryn@yugabyte.com>)
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> So I can see an argument for the existing behavior.  It doesn't seem worth
> changing in any case.  And I don't really see the documentation being
> improved by covering this corner case in detail when the current behavior
> is at least intuitive.

quote_ident is a good bit more conservative than the core lexer
about what is an "identifier character" --- it considers all
non-ASCII characters as requiring quoting, too.

For typical uses of quote_ident, I think this is good future-proofing:
it makes it very much less likely that something quote_ident decides
not to quote would be rejected by some future PG version (not to mention
non-PG SQL databases).  So I'm not really in a hurry to change the code.
Maybe we should tweak the docs a bit.

            regards, tom lane



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: ('dog$house' = quote_ident('dog$house')) is surprisingly FALSE