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 5552C925F10 for ; Thu, 29 May 2003 17:29:40 -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 84741-02 for ; Thu, 29 May 2003 17:29:38 -0400 (EDT) Received: from smtp1.mts.net (smtp1.mts.net [205.200.16.74]) by developer.postgresql.org (Postfix) with ESMTP id 8551E925F0F for ; Thu, 29 May 2003 17:29:38 -0400 (EDT) Received: from cleartag (wnpgmb01bbw-ac01-p8-120.mts.net [142.161.8.120]) by smtp1.mts.net (8.12.8p1/8.11.3) with SMTP id h4TLTYGl005868; Thu, 29 May 2003 16:29:34 -0500 (CDT) Message-ID: <006401c32629$7e049510$0100007f@cleartag> From: "George Weaver" To: "Brian Knox" Cc: References: <005001c32624$0f0f3980$0100007f@cleartag> Subject: Re: "record" datatype - plpgsql Date: Thu, 29 May 2003 16:29:39 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/560 X-Sequence-Number: 13725 Brian, You can also use the "record" type as well in the same way. George ----- Original Message ----- From: "George Weaver" To: "Brian Knox" ; Sent: Thursday, May 29, 2003 2:01 PM Subject: Re: [SQL] "record" datatype - plpgsql > 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 > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >