On Sunday, June 2, 2024, Mor Lehr <mor(dot)lehr(at)deel(dot)com> wrote:
> Thanks for the prompt reply.
> Can you please refer me to the section in the documentation that describes
> this behavior?
> This (automatically interperting 1 as select 1) is totally an unexpected
> behavior for me.
>
https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-STATEMENTS-ASSIGNMENT
“As explained previously, the expression in such a statement is evaluated
by means of an SQL SELECT command sent to the main database engine.”
David J.