Adding support for a fully qualified column-name in UPDATE ... SET

Поиск
Список
Период
Сортировка
От Jim Finnerty
Тема Adding support for a fully qualified column-name in UPDATE ... SET
Дата
Msg-id 1544202288966-0.post@n3.nabble.com
обсуждение исходный текст
Ответы Re: Adding support for a fully qualified column-name in UPDATE ... SET  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
The accepted syntax for UPDATE ... SET does not currently permit the column
name to be qualified by schema.table or table or correlation-name, as is
permitted in other systems.  This is apparently due to the syntax that
PostgreSQL accepts for composite columns, which would create an ambiguity in
the grammar if both SET t.c [ opt_indirection ] = value, or SET c.f [
opt_indirection ] = value, were both allowed.

As a result, databases migrated from several other commercial database
servers to PostgreSQL must be "cleaned up" to reconcile these differences.
This can be time consuming and unnecessary.

This can be disambiguated during semantic analysis in all but the most
contrived cases.

The current behavior has been documented as follows:

column_name

    The name of a column in the table named by table_name. The column name
can be qualified with a subfield name or array subscript, if needed. Do not
include the table's name in the specification of a target column — for
example, UPDATE table_name SET table_name.col = 1 is invalid.

If the community is willing to extend this behavior to support optional
schema-name . table-name, table-name, or correlation-name, we can discuss
solutions in this thread.

thank you,

    /Jim





-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html


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

Предыдущее
От: Sergei Kornilov
Дата:
Сообщение: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: additional foreign key test coverage