X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3FF39475956 for ; Mon, 28 Apr 2003 09:01:10 -0400 (EDT) Received: from nat.inquent.com (CPE00508b028d7d-CM00803785c5e0.cpe.net.cable.rogers.com [24.103.22.28]) by postgresql.org (Postfix) with ESMTP id 1CA58475B47 for ; Mon, 28 Apr 2003 09:00:39 -0400 (EDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by nat.inquent.com (8.12.8p1/8.12.8) with ESMTP id h3SD0jTU033152; Mon, 28 Apr 2003 09:00:45 -0400 (EDT) (envelope-from rbt@rbt.ca) Subject: Re: plpgsql Question.. From: Rod Taylor To: Rajesh Kumar Mallah Cc: pgsql-sql@postgresql.org In-Reply-To: <200304281742.24167.mallah@trade-india.com> References: <200304281742.24167.mallah@trade-india.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-+ftl3YXGYU6K1a751dTJ" Organization: Message-Id: <1051534844.51984.8.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 28 Apr 2003 09:00:45 -0400 X-Spam-Status: No, hits=-41.9 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/412 X-Sequence-Number: 13113 --=-+ftl3YXGYU6K1a751dTJ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2003-04-28 at 08:12, Rajesh Kumar Mallah wrote: > is it possible to access a feild in a RECORD type=20 > variable where the feild name is variable. >=20 > eg say r is a record having feild name , email , salary >=20 > r.name is 'foo' > r.email is 'bar@foo.com'=20 > r.salary is 1000 >=20 > suppose feild_name iterates via a FOR LOOP > through values (name , email , salary) >=20 > is it possible to access that feild in record r > inside the loop ? Not that I'm aware of. What you can do it build the query to SELECT FROM table. Another alternative is to switch languages. A perl, tcl, etc. based function would be capable of doing what you want. --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-+ftl3YXGYU6K1a751dTJ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQA+rSX86DETLow6vwwRAgHCAJwPLocGLsrF/A9WTToLnF80V+1PeACeJB8v G4wkNVajtDQpjzh+ObLd7gM= =DCVk -----END PGP SIGNATURE----- --=-+ftl3YXGYU6K1a751dTJ--