Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 06BA09FB399 for ; Tue, 13 Mar 2007 10:02:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 77366-04 for ; Tue, 13 Mar 2007 10:02:36 -0300 (ADT) X-Greylist: delayed 00:12:22.253523 by SQLgrey-1.7.4 Received: from correio2.docasdoporto.com.br (8.144.199.200.docasdoporto.com.br [200.199.144.8]) by postgresql.org (Postfix) with ESMTP id B9A999FB3AA for ; Tue, 13 Mar 2007 10:02:41 -0300 (ADT) Received: from [201.30.172.2] (account ezequias@fastcon.com.br HELO [192.168.0.110]) by correio2.docasdoporto.com.br (CommuniGate Pro SMTP 4.1.8) with ESMTP id 46353235; Tue, 13 Mar 2007 10:19:49 -0300 Message-ID: <45F6A06E.7090104@fastcon.com.br> Date: Tue, 13 Mar 2007 10:00:30 -0300 From: "Ezequias R. da Rocha" User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: "Ezequias R. da Rocha" CC: pgsql-sql@postgresql.org Subject: Re: For loop References: <45F69D7C.4070304@fastcon.com.br> In-Reply-To: <45F69D7C.4070304@fastcon.com.br> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200703/153 X-Sequence-Number: 27791 Ezequias R. da Rocha escreveu: > Hi list, > > I would like to test the power of processing of postgresql (and my > server) by insert a large ammount of data on a table I have. > > I would like to know how to implement a For... loop . With it I think > I could check the real power of my server. > > Ezequias > I tryed a way but it is not working. Please see it: LOOP; -- some computations insert into carga (desc) values ('My Text'); IF count > 1000000 THEN EXIT; -- exit loop END IF; END LOOP; The postgresql reports the following error: / ERROR: syntax error at or near "LOOP" SQL state: 42601 Character: 1/