"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The SET command cannot be parameterized so using variables in the statement
> is not supported and the attempt to do so is treated as writing an
> identifier. You will need to use the format function and the execute
> plpgsql command to create and execute the statement.
While this is documented (last para of "42.11.1. Variable Substitution"),
it's not exactly prominent. Should we move that to somewhere more
visible? If so where?
regards, tom lane