Doc: improve discussion of variable substitution in PL/pgSQL.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Mar 2021 17:09:13 +0000 (13:09 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Mar 2021 17:09:13 +0000 (13:09 -0400)
commitc783e656d41816b0328cb4bff27f11b70200770e
tree643db6e7c75da93ee5927fd8e38c1a31f568825c
parent7f7f25f15edb6eacec58179ef5285e874aa4435b
Doc: improve discussion of variable substitution in PL/pgSQL.

This was a bit disjointed, partly because of a not-well-considered
decision to document SQL commands that don't return result rows as
though they had nothing in common with commands that do.  Rearrange
so that we have one discussion of variable substitution that clearly
applies to all types of SQL commands, and then handle the question
of processing command output separately.  Clarify that EXPLAIN,
CREATE TABLE AS SELECT, and similar commands that incorporate an
optimizable statement will act like optimizable statements for the
purposes of variable substitution.  Do a bunch of minor wordsmithing
in the same area.

David Johnston and Tom Lane, reviewed by Pavel Stehule and David
Steele

Discussion: https://postgr.es/m/CAKFQuwYvMKucM5fnZvHSo-ah4S=_n9gmKeu6EAo=_fTrohunqQ@mail.gmail.com
doc/src/sgml/plpgsql.sgml