Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 7514B475E20 for ; Fri, 3 May 2002 18:27:31 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 85B024760FC for ; Fri, 3 May 2002 18:24:05 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g43MO1v22686; Fri, 3 May 2002 18:24:01 -0400 (EDT) To: Joseph Barillari Cc: pgsql-sql Subject: Re: Returning composite types from a plpgsql function In-reply-to: References: Comments: In-reply-to Joseph Barillari message dated "Fri, 03 May 2002 17:24:40 -0400" Date: Fri, 03 May 2002 18:24:01 -0400 Message-ID: <22683.1020464641@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200205/21 X-Sequence-Number: 7657 Joseph Barillari 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 allow SELECT ... FROM function(...) which would make functions returning rowtypes a whole lot more useful. regards, tom lane