John Lawler <postgresql(dot)org(at)tgice(dot)com> writes:
> Plus, the main part was to be able to have the columns (arbitrarily)
> named as if they'd been selected from a table. I hope that there's
> something about as easy as the example I cited from MS SQL.
In existing releases you need to create a named composite type (row
type) and declare the function as returning that type. PG 8.1 will
provide some syntactic sugar for this in the form of OUT parameters.
There are examples in the docs ...
regards, tom lane