RE: [GENERAL] question about looping through records in plpgsql

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Michael Davis <michael(dot)davis(at)prevuenet(dot)com>, pgsql-general(at)postgreSQL(dot)org
Subject: RE: [GENERAL] question about looping through records in plpgsql
Date: 1999-03-04 21:28:12
Message-ID: F10BB1FAF801D111829B0060971D839F6DF558@cpsmail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Have you tried defining what the variable "row" is.
Just a thought,
-DEJ

> -----Original Message-----
> From: Michael Davis [mailto:michael(dot)davis(at)prevuenet(dot)com]
> Sent: Thursday, March 04, 1999 3:18 PM
> To: pgsql-general(at)postgreSQL(dot)org
> Subject: [GENERAL] question about looping through records in plpgsql
>
>
> Here is a function that loops through membership records. I
> have tried many
> different variations of this but have not been able to make
> this work. Has
> any one been able to get something similar to this working?
> Is there any
> additional documentation on plpgsql? Is there a another
> language that would
> be better for something like this?
>
> CREATE FUNCTION test(varchar, varchar) RETURNS int2 AS '
> DECLARE
> options ALIAS FOR $1;
> username ALIAS FOR $2;
> mid int4;
> BEGIN
> FOR row IN select * from membership LOOP
> statements;
> END LOOP;
> return 0;
> END; ' LANGUAGE 'plpgsql';
>
>
> Thanks, Michael
>

Browse pgsql-general by date

  From Date Subject
Next Message Luis Dolz 1999-03-05 02:28:13 RV: Problems with Visual Fox
Previous Message Michael Davis 1999-03-04 21:18:18 question about looping through records in plpgsql