Re: accessing fully qualified fields in records in PLPGSQL? - Mailing list pgsql-general

From Jan Wieck
Subject Re: accessing fully qualified fields in records in PLPGSQL?
Date
Msg-id 200203252120.g2PLK5o25548@saturn.janwieck.net
Whole thread Raw
In response to accessing fully qualified fields in records in PLPGSQL?  ("Oberpriller, Wade D." <oberpwd@nsc-msg01.network.com>)
List pgsql-general
Oberpriller, Wade D. wrote:
> How does one access a field in a record from a query like so:
>
> FOR REC IN SELECT myTable.oid FROM myTable, yourTable WHERE (myTable.id =
> yourTable.id) LOOP
>    VAL := REC.oid;
>    VAL := REC.myTable.oid;
> END LOOP;
>
> I get errors in PLPGSQL compilation for both the assignment statements
> above. What is the correct way to get the myTable oid in the REC record?

    REC  beeing  of type record and VAL beeing of type oid in the
    declare section,  I  don't  get  any  error  on  the  REC.oid
    attempt.  What  version  of PostgreSQL are you using (this is
    v7.2).


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-general by date:

Previous
From: "Johnson, Shaunn"
Date:
Subject: Re: file size issue?
Next
From:
Date:
Subject: Re: rule problem