Re: accessing fully qualified fields in records in PLPGSQL?

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: "Oberpriller, Wade D(dot)" <oberpwd(at)nsc-msg01(dot)network(dot)com>
Cc: "PostgreSQL General Help (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: accessing fully qualified fields in records in PLPGSQL?
Date: 2002-03-25 21:20:04
Message-ID: 200203252120.g2PLK5o25548@saturn.janwieck.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Yahoo(dot)com #

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message tsmets 2002-03-25 21:43:07 Re: rule problem
Previous Message Johnson, Shaunn 2002-03-25 21:14:37 Re: file size issue?