Skip site navigation (1) Skip section navigation (2)

accessing fully qualified fields in records in PLPGSQL?

From: "Oberpriller, Wade D(dot)" <oberpwd(at)nsc-msg01(dot)network(dot)com>
To: "PostgreSQL General Help (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: accessing fully qualified fields in records in PLPGSQL?
Date: 2002-03-25 16:20:58
Message-ID: 5B7014A44B89494E830AD32859FBC85802B3857D@nsc-msg01.network.com (view raw or flat)
Thread:
Lists: pgsql-general
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?

Wade Oberpriller                 http://www.storagetek.com
Software Development             Phone: (763) 424-1538
StorageTek: MRDC                        (800) 328-9108 ext. 1538
wade_oberpriller(at)storagetek(dot)com  Fax:   (763) 391-1095

Responses

pgsql-general by date

Next:From: Darren FergusonDate: 2002-03-25 16:52:11
Subject: Re: accessing fully qualified fields in records in PLPGSQL?
Previous:From: Darren FergusonDate: 2002-03-25 16:10:35
Subject: Re: Could someone tell me what is wrong withthis function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group