Re: SELECT ... FOR UPDATE OF clause documentation implies use of table_names rather than aliases

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: SELECT ... FOR UPDATE OF clause documentation implies use of table_names rather than aliases
Дата
Msg-id CAKFQuwb=PnpzD=k7wWyWNdE2NnExw0kLpYcpOOC4P_EHdC8Wtw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SELECT ... FOR UPDATE OF clause documentation implies use of table_names rather than aliases  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: SELECT ... FOR UPDATE OF clause documentation implies use of table_names rather than aliases  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
On Mon, Nov 20, 2023 at 7:04 PM Bruce Momjian <bruce@momjian.us> wrote:
On Fri, Nov 17, 2023 at 03:44:04PM -0700, David G. Johnston wrote:
> I don't like this particular solution to the stated complaint.  When a FROM
> entry has an alias it must be referenced via that alias anywhere it is
> referenced in the query - and indeed it is an error to not write the alias in
> your example.  It is not an improvement to write [ table_name | alias ] in our
> syntax to try and demonstrate this requirement.  If we do want to not say
> "table_name" I suggest we say instead "from_reference" and then just define
> what that means (i.e., an unaliased table name or an alias in the sibling FROM
> clause attached to this level of the query).  I like this better anyway on the
> grounds that the thing being referenced can be a subquery or a view as well as
> a table.

Okay, how is the attached patch?


The placement in the numbered listing section feels wrong, I am OK with the wording.  It should be down in the clause details.

FOR lock_strength [ OF from_reference [, ...] ] [ NOWAIT | SKIP LOCKED ]  -- need to change this spot to match

where lock_strength can be one of

[...]

+ and from_reference must be a table alias or non-hidden table_name referenced in the FROM clause.

For more information on each [...]

David J.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: SELECT ... FOR UPDATE OF clause documentation implies use of table_names rather than aliases
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: SELECT ... FOR UPDATE OF clause documentation implies use of table_names rather than aliases