Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AAA2D9FB636 for ; Tue, 13 Mar 2007 10:32:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 13992-02-2 for ; Tue, 13 Mar 2007 10:32:16 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by postgresql.org (Postfix) with ESMTP id 5F8E19FB66A for ; Tue, 13 Mar 2007 10:32:16 -0300 (ADT) Received: from [192.168.0.9] (c-24-17-161-80.hsd1.wa.comcast.net[24.17.161.80]) by comcast.net (rwcrmhc15) with ESMTP id <20070313133214m15002h2qae>; Tue, 13 Mar 2007 13:32:14 +0000 From: Adrian Klaver To: pgsql-sql@postgresql.org Subject: Re: For loop Date: Tue, 13 Mar 2007 06:32:34 -0700 User-Agent: KMail/1.9.1 References: <45F69D7C.4070304@fastcon.com.br> <45F6B1A2.A3DD.0030.0@indicator.be> <45F6A4E5.7090707@fastcon.com.br> In-Reply-To: <45F6A4E5.7090707@fastcon.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703130632.34282.aklaver@comcast.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.465 tagged_above=0 required=5 tests=AWL, BAYES_05 X-Spam-Level: X-Archive-Number: 200703/158 X-Sequence-Number: 27796 On Tuesday 13 March 2007 6:19 am, Ezequias R. da Rocha wrote: > They are not working well. > > Allways the same error. > > (if while) > ERROR: syntax error at or near "WHILE" > SQL state: 42601 > Character: 1 > > (if for) > > ERROR: syntax error at or near "FOR" > SQL state: 42601 > Character: 1 > > (if loop) > ERROR: syntax error at or near "LOOP" > SQL state: 42601 > Character: 1 > I installed the pgsql but I don't think it is a problem of language. > What could be wrong ? I am not using functions too. I am using the SQL > tool of PgAdmin III. > > Any help would be glad. > Can we see the complete function? -- Adrian Klaver aklaver@comcast.net