Thread: plpgsql execution

plpgsql execution

From
"Girish Bajaj"
Date:

Is there any way I can run the following code in the query executer without creating a function for it?

 

FOR i IN 1..100 LOOP

PERFORM time_delay(1);

insert into worklist(startid, endid, cellid, campaignid, status, claim, flastjob) values(1,2,3,4,5,\'mju\',CAST(1 as BIT));

END LOOP;

 

The language is PLPGSQL. And I really don’t want to write a function to execute it. Can the query executer automatically execute it for me?

 

Thanks,

Girish

 

 

Re: plpgsql execution

From
Stephan Szabo
Date:
On Fri, 25 Jul 2003, Girish Bajaj wrote:

> Is there any way I can run the following code in the query executer without
> creating a function for it?

Not that I know of.

>
> FOR i IN 1..100 LOOP
>
> PERFORM time_delay(1);
>
> insert into worklist(startid, endid, cellid, campaignid, status, claim,
> flastjob) values(1,2,3,4,5,\'mju\',CAST(1 as BIT));
>
> END LOOP;
>
>
>
> The language is PLPGSQL. And I really don't want to write a function to
> execute it. Can the query executer automatically execute it for me?