dim <dim45(at)gmx(dot)net> writes:
> The error is "Function returning row cannot return null
> value". Is the only solution to this problem to declare function get_a
> to return "SET OF a" ?
Might not be the only solution, but IMHO it's the correct solution.
Your underlying SELECT returns either a row, or no row (or possibly
more than one row?) so the function should too.
> Am I missing anything or is
> record assignment not possible in plpgsql?
Your example works fine for me in PG 8.0. There were some improvements
in this area since 7.*, though I'm not sure offhand whether they were
material to this particular case.
regards, tom lane