SELECT ... FOR UPDATE OF clause documentation implies use oftable_names rather than aliases

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема SELECT ... FOR UPDATE OF clause documentation implies use oftable_names rather than aliases
Дата
Msg-id 152483686904.19805.3369061025704720797@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: SELECT ... FOR UPDATE OF clause documentation implies use of table_names rather than aliases  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/static/sql-select.html
Description:

In the SELECT statement page the argument type of the (FOR SHARE/UPDATE) OF
clause is listed to be a table_name. This is not *quite* accurate - it
should reference the *alias* assigned to the table if one was given. The
distinction is subtly important, as without this information the
documentation implies that the choice of rows to lock can only be done
per-table (i.e. that in a query mentioning the same table twice, *any*
tuples being pulled from that table would be given the same treatment).

But in fact postgres supports specifying the locking behaviour per-alias,
which is a really powerful ability. And actually, trying to specify it by
actual "table name" where an alias has been assigned won't work either.


robert.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Appendix A. PostgreSQL Error Codes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Appendix A. PostgreSQL Error Codes