Re: docs: psql and variable interpolation

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: docs: psql and variable interpolation
Дата
Msg-id CAKFQuwb5gS3qrAuF4FzEid4EwDrMVKwBP2bHD_o=S5nOiEsfXQ@mail.gmail.com
обсуждение исходный текст
Ответ на docs: psql and variable interpolation  (Philippe Beaudoin <philippe.beaudoin@dalibo.com>)
Ответы Re: docs: psql and variable interpolation
Список pgsql-docs
On Monday, July 13, 2020, Philippe Beaudoin <philippe.beaudoin@dalibo.com> wrote:

The first sentence of this SQL interpolation chapter says "A key feature of psql variables is that you can substitute (interpolate) them into regular SQL statements, as well as the arguments of meta-commands." But nothing in this chapter indicates that there are exceptions.

May be we could have a wording adjustment with something like : "A key feature of psql variables is that you can substitute (interpolate) them into regular SQL statements, as well as the arguments of meta-commands (unless specifically noted)."


Having “unless otherwise noted” be implied doesn’t seem like a big failing.  As for this case it is documented as being an exception:

“Unlike most other meta-commands, the entire remainder of the line is always taken to be the arguments of \copy, and neither variable interpolation nor backquote expansion are performed in the arguments.”

If it is only \copy that is an exception I’d rather just say (except \copy} and not have the user meticulously read each item for the single exception.  This extends to if there are a few.

David J.

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: docs: psql and variable interpolation
Следующее
От: J Lumby
Дата:
Сообщение: TIMESTAMP