Guy Rouillier <guyr-ml1@burntmail.com> writes:
> In short, why isn't the
> following legal in a PL/pgsql procedure:
> NEW.user_name := (SHOW uservars.user_name);
Because that isn't a legal SQL subexpression. (This isn't really the
approved way of using SELECT, either, since what you're writing is
a redundant sub-SELECT.) It seems that this works in recent plpgsql
versions, FWIW:
show autovacuum into r;
regards, tom lane