James,
> I understand this and my current example actually works.
> My question is I dont need a loop as it only ever returns one row.
This is a current limitation of PL/pgSQL. Until PL/pgSQL is improved by some
enterprising soul, you cannot select the results of a query directly into a
RECORD variable without a loop.
For that matter, you will find that you cannot declare an array variable
inside a PL/pgSQL procedure. This is also on the TODO list.
--
Josh Berkus
Aglio Database Solutions
San Francisco