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 3D242925747 for ; Fri, 30 May 2003 13:12:45 -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 52203-06 for ; Fri, 30 May 2003 13:12:40 -0400 (EDT) Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by developer.postgresql.org (Postfix) with ESMTP id 99880924EFA for ; Fri, 30 May 2003 13:12:40 -0400 (EDT) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id 62B4021068; Fri, 30 May 2003 10:12:38 -0700 (PDT) Date: Fri, 30 May 2003 10:12:38 -0700 From: Sean Chittenden To: Brian Knox Cc: George Weaver , pgsql-sql@postgresql.org Subject: Re: "record" datatype - plpgsql Message-ID: <20030530171238.GL62688@perrin.int.nxad.com> References: <005001c32624$0f0f3980$0100007f@cleartag> <9212.1054302602@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9212.1054302602@sss.pgh.pa.us> X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 3849 3760 1AFE 7B17 11A0 83A6 DD99 E31F BC84 B341 X-Web-Homepage: http://sean.chittenden.org/ User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/574 X-Sequence-Number: 13739 > > 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. > > Not in plpgsql ... and if you did, you couldn't do anything useful > with the names (like access the fields) anyway. I believe you can > do it in pltcl though. If you're shopping around for pl languages, pl/ruby fits the bill too. Reflective language with dynamic execution. -sc http://moulon.inra.fr/ruby/plruby.html -- Sean Chittenden