From: | Philippe Beaudoin <philippe(dot)beaudoin(at)dalibo(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: docs: psql and variable interpolation |
Date: | 2020-07-15 15:36:34 |
Message-ID: | f2fd7790-3824-60fd-1de4-b14f135b72f1@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Le 13/07/2020 à 17:45, David G. Johnston a écrit :
> On Monday, July 13, 2020, Philippe Beaudoin
> <philippe(dot)beaudoin(at)dalibo(dot)com <mailto:philippe(dot)beaudoin(at)dalibo(dot)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.
As far as I know, the \! metacommand is another exception. But I don't
know if there are some others.
>
> David J.
>
------------------------------------------------------------------------
<https://www.dalibo.com/>
*DALIBO*
*L'expertise PostgreSQL*
43, rue du Faubourg Montmartre
75009 Paris *Philippe Beaudoin*
*Consultant Avant-Vente*
+33 (0)1 84 72 76 11
+33 (0)7 69 14 67 21
philippe(dot)beaudoin(at)dalibo(dot)com
Valorisez vos compétences PostgreSQL, certifiez-vous chez Dalibo
<https://certification.dalibo.com/> !
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-07-15 15:49:44 | Re: docs: psql and variable interpolation |
Previous Message | Magnus Hagander | 2020-07-15 11:13:08 | Installation instructions vs binaries |