+ <term><varname>too_many_rows</varname></term> + <listitem> + <para> + When result is assigned to a variable by <literal>INTO</literal> clause, + checks if query returns more than one row. In this case the assignment + is not deterministic usually - and it can be signal some issues in design.
Shouldn't this also apply to
var := blah FROM some_table WHERE ...;
?
AIUI that's one of the beefs the plpgsql2 project has.
No, not at all. That syntax is undocumented and only works because PL/PgSQL is a hack internally. We don't use it, and frankly I don't think anyone should.