Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 2B5FF9FBA6F for ; Fri, 11 May 2007 12:13:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 46045-10 for ; Fri, 11 May 2007 12:12:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from a2s5.a2hosting.com (a2s5.a2hosting.com [209.124.50.10]) by postgresql.org (Postfix) with ESMTP id E982F9FB90C for ; Fri, 11 May 2007 12:13:02 -0300 (ADT) Received: from adsl-153-125-102.tys.bellsouth.net ([70.153.125.102] helo=[192.168.1.12]) by a2s5.a2hosting.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1HmWnl-0002ZJ-8y; Fri, 11 May 2007 11:13:01 -0400 In-Reply-To: <20070511164242.7ed1f046@gabriel-laptop> References: <20070511160037.1c09160e@gabriel-laptop> <1f30b80c0705110709u73519990gd6623c6a4c81ee55@mail.gmail.com> <20070511164242.7ed1f046@gabriel-laptop> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Cc: pgsql-sql@postgresql.org Content-Transfer-Encoding: quoted-printable From: John DeSoi Subject: Re: PL/PGSQL Record type question Date: Fri, 11 May 2007 11:12:56 -0400 To: =?ISO-8859-1?Q?G=E1briel_=C1kos?= X-Mailer: Apple Mail (2.752.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s5.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/85 X-Sequence-Number: 28365 You can use CREATE TYPE: http://www.postgresql.org/docs/8.2/interactive/sql-createtype.html Example from the documentation: CREATE TYPE compfoo AS (f1 int, f2 text); Then make your function return compfoo (or setof compfoo). =20 Alternately, you can define your function with out or in/out =20 parameters so you don't need the CREATE TYPE statement. On May 11, 2007, at 10:42 AM, G=E1briel =C1kos wrote: >> You might be looking for PostgreSQL RECORD data type. > > Thanks. Give me an example please. I saw the documentation already. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL