X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D4D88D1C944 for ; Fri, 25 Jul 2003 15:41:03 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 50229-07 for ; Fri, 25 Jul 2003 12:40:15 -0300 (ADT) Received: from megazone.bigpanda.com (unknown [66.180.233.26]) by svr1.postgresql.org (Postfix) with ESMTP id 221BFD1C928 for ; Fri, 25 Jul 2003 12:41:02 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3E837D638; Fri, 25 Jul 2003 08:41:00 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 2C22D5C0C; Fri, 25 Jul 2003 08:41:00 -0700 (PDT) Date: Fri, 25 Jul 2003 08:40:59 -0700 (PDT) From: Stephan Szabo To: Girish Bajaj Cc: Subject: Re: plpgsql execution In-Reply-To: <002301c35272$f773d9e0$7764a8c0@tietronix.com> Message-ID: <20030725084030.U31713-100000@megazone.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/260 X-Sequence-Number: 9600 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?