From: | Brian Knox <laotse(at)aol(dot)net> |
---|---|
To: | George Weaver <georgew1(at)mts(dot)net> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: "record" datatype - plpgsql |
Date: | 2003-05-30 12:52:09 |
Message-ID: | Pine.LNX.4.53.0305300851380.13440@tao.office.aol.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)aol(dot)net>
> To: <pgsql-sql(at)postgresql(dot)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
> >
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-05-30 13:50:02 | Re: "record" datatype - plpgsql |
Previous Message | Richard Huxton | 2003-05-30 06:25:02 | Re: please helpme ? |