pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brian Knox <laotse@aol.net>
To: George Weaver <georgew1@mts.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: "record" datatype - plpgsql
Date: Fri, 30 May 2003 08:52:09 -0400 (EDT)
Message-ID: <Pine.LNX.4.53.0305300851380.13440@tao.office.aol.com> (raw)
In-Reply-To: <005001c32624$0f0f3980$0100007f@cleartag>
References: <Pine.LNX.4.53.0305280753040.30365@tao.office.aol.com>
	<005001c32624$0f0f3980$0100007f@cleartag>


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" <laotse@aol.net>
> To: <pgsql-sql@postgresql.org>
> 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
> >
>



view thread (8+ messages)  latest in thread

Message-ID: <Pine.LNX.4.53.0305300851380.13440@tao.office.aol.com>
Permalink:  ../Pine.LNX.4.53.0305300851380.13440@tao.office.aol.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.53.0305300851380.13440@tao.office.aol.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: laotse@aol.net, georgew1@mts.net
  Subject: Re: "record" datatype - plpgsql
  In-Reply-To: <Pine.LNX.4.53.0305300851380.13440@tao.office.aol.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox