X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7D4B6D1B52F for ; Mon, 10 Nov 2003 11:12:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 82791-07 for ; Mon, 10 Nov 2003 07:12:00 -0400 (AST) Received: from smtp.noos.fr (nan-smtp-21.noos.net [212.198.2.116]) by svr1.postgresql.org (Postfix) with ESMTP id EC6F5D1B4F6 for ; Mon, 10 Nov 2003 07:11:56 -0400 (AST) Received: (qmail 32038 invoked by uid 0); 10 Nov 2003 11:10:54 -0000 Received: from unknown (HELO camille) ([195.132.172.238]) (envelope-sender ) by 212.198.2.116 (qmail-ldap-1.03) with SMTP for ; 10 Nov 2003 11:10:54 -0000 Message-ID: <00a201c3a77d$4457c820$eeac84c3@camille> From: "Guillaume Houssay" To: Subject: FOR : Structure control pb Date: Mon, 10 Nov 2003 12:24:55 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_009F_01C3A785.A5EB3510" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=HTML_50_60 X-Spam-Level: X-Archive-Number: 200311/81 X-Sequence-Number: 15896 This is a multi-part message in MIME format. ------=_NextPart_000_009F_01C3A785.A5EB3510 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am using the For controle structure as follows FOR i IN 0..23 LOOP query END LOOP; The query is tested and is working OK. When I launch the loop in psql interface, I get the error parse error at or= near FOR. As this is the first time I use this kind of struture I am probably using i= t the wrong way. Thank you for your answer ------=_NextPart_000_009F_01C3A785.A5EB3510 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am using the For controle structure as= =20 follows
 
FOR i IN 0..23 LOOP
 
query
 
END LOOP;
 
The query is tested and is working OK.
 
When I launch the loop in psql interface, = I get the=20 error parse error at or near FOR.
 
As this is the first time I use this kind = of=20 struture I am probably using it the wrong way.
 
Thank you for your=20 answer
------=_NextPart_000_009F_01C3A785.A5EB3510--