"Cornelia Boenigk" <poppcorn@cornelia-boenigk.de> writes:
> Could anybody explain this behaviour?
See
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/xfunc-sql.html
which says in part:
In the present release of PostgreSQL there are some unpleasant
restrictions on how functions returning composite types can be
used. Briefly, when calling a function that returns a row, we cannot
retrieve the entire row. We must either project a single attribute out
of the row or pass the entire row into another function. (Trying to
display the entire row value will yield a meaningless number.)
regards, tom lane