Re: Returning composite types from a plpgsql function - Mailing list pgsql-sql

From Tom Lane
Subject Re: Returning composite types from a plpgsql function
Date
Msg-id 22683.1020464641@sss.pgh.pa.us
Whole thread Raw
In response to Returning composite types from a plpgsql function  (Joseph Barillari <jbarilla@princeton.edu>)
List pgsql-sql
Joseph Barillari <jbarilla@princeton.edu> writes:
> Unfortunately, when I execute this, I get:

> cal=3D> select frob();
>    frob=20=20=20=20
> -----------
>  172795360
> (1 row)

You can't do anything useful with a rowtype function result except
select a single field from it.  The manual's discussion for SQL
functions also applies to PL-language functions:
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/xfunc-sql.html#AEN26354

There is work afoot to allowSELECT ... FROM function(...)
which would make functions returning rowtypes a whole lot more useful.
        regards, tom lane


pgsql-sql by date:

Previous
From: Joseph Barillari
Date:
Subject: Returning composite types from a plpgsql function
Next
From: Jakub Ouhrabka
Date:
Subject: difficult query