The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/18/plpgsql-implementation.html Description:
In the last paragraph of the section 41.11.1. "Variable Substitution" there is such a sentence -- "Variable substitution currently works only in SELECT, INSERT, UPDATE, DELETE, and commands containing one of these..." https://www.postgresql.org/docs/current/plpgsql-implementation.html#PLPGSQL-VAR-SUBST But experiments showed that variable substitution works for MERGE command too.
