"Jon Obuchowski" <jon_obuchowski(at)terc(dot)edu> writes:
> Any help with this is appreciated; if I am simply overlooking relevant
> documentation I'd appreciate being pointed towards the relevant page.
This is discussed under the not-too-obvious heading of "composite types"
at
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/xfunc-sql.html
The short answer is that your function is fine, it's what to do with
the result that's problematic at the moment.
regards, tom lane