X-Original-To: pgsql-sql@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 6779492584F for ; Fri, 30 May 2003 09:03:32 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 88267-06 for ; Fri, 30 May 2003 09:02:36 -0400 (EDT) Received: from tao.office.aol.com (pix-fw.wan.aol.com [152.163.190.1]) by developer.postgresql.org (Postfix) with ESMTP id C36E09255A5 for ; Fri, 30 May 2003 08:56:47 -0400 (EDT) Received: from tao.office.aol.com (laotse@localhost [127.0.0.1]) by tao.office.aol.com (8.12.9/8.12.9/Debian-3) with ESMTP id h4UCqJV4013452; Fri, 30 May 2003 08:52:20 -0400 Received: from localhost (laotse@localhost) by tao.office.aol.com (8.12.9/8.12.9/Debian-3) with ESMTP id h4UCq9Jj013448; Fri, 30 May 2003 08:52:14 -0400 X-Authentication-Warning: tao.office.aol.com: laotse owned process doing -bs Date: Fri, 30 May 2003 08:52:09 -0400 (EDT) From: Brian Knox X-X-Sender: laotse@tao.office.aol.com To: George Weaver Cc: pgsql-sql@postgresql.org Subject: Re: "record" datatype - plpgsql In-Reply-To: <005001c32624$0f0f3980$0100007f@cleartag> Message-ID: References: <005001c32624$0f0f3980$0100007f@cleartag> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/565 X-Sequence-Number: 13730 That's not what I was asking. I know I can access the values of each column using NEW.columnname. What I was asking is if there's anyway to use the NEW record to get a list of the columnnames in it without knowing them beforehand. Brian Knox On Thu, 29 May 2003, George Weaver wrote: > Hi Brian; > > Assuming "NEW" has been declared as foo%rowtype, you can access the > columns thus > > NEW.xxx where xxx is the column name > > HTH. > George > > ----- Original Message ----- > From: "Brian Knox" > To: > Sent: Thursday, May 29, 2003 11:11 AM > Subject: [SQL] "record" datatype - plpgsql > > > > Given a variable of the "record" data type in pl/pgsql, is it possible to > > get the names of the columns ( attributes ) of that record? > > > > eg, given record "NEW" for table "foo", is there a way to get information > > concerning the columns that make up that record? > > > > Brian Knox > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/docs/faqs/FAQ.html > > >