Re: Feature Request: Allow additional special characters at the beginning of the name.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Feature Request: Allow additional special characters at the beginning of the name.
Дата
Msg-id 614222.1634093368@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Feature Request: Allow additional special characters at the beginning of the name.  (Mark Simon <mark@manngo.net>)
Список pgsql-hackers
Mark Simon <mark@manngo.net> writes:
> I’m not asking for a change in how PostgreSQL manages variables, but
> whether it’s possible to allow the @ sign, and possibly the $ sign to
> start a variable name.

@ is allowed in operator names, and indeed is used in (mumble select
count(*) ...) 59 built-in operators.  So we could not support that
without breaking a lot of applications.  Is "a<@b" to be parsed as
"a <@ b" or "a < @b"?  For that matter, is "@a" a name or an invocation
of the built-in prefix operator "@" on variable "a"?

As for allowing $ to start a name, there are also issues:

* It'd be rather ambiguous with the $id$ string delimiter syntax [1],
which is a Postgres-ism for sure, but a lot of people use it.

* It'd not be entirely clear whether $1 is a variable name
or a parameter reference.

* I think there are client interfaces that allow $name to be
a parameter symbol, so we'd also be breaking anything that
works that way.

Maybe we could have done this twenty years ago, but I think
compatibility considerations preclude it now.

            regards, tom lane

[1] https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING



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

Предыдущее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: RE: Added schema level support for publication.
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [BUG] Unexpected action when publishing partition tables