From: Richard Huxton <dev@archonet.com>
To: Guillaume Houssay <ghoussay@noos.fr>
To: pgsql-sql@postgresql.org
Subject: Re: FOR : Structure control pb
Date: Mon, 10 Nov 2003 12:05:04 +0000
Message-ID: <200311101205.05037.dev@archonet.com> (raw)
In-Reply-To: <00a201c3a77d$4457c820$eeac84c3@camille>
References: <00a201c3a77d$4457c820$eeac84c3@camille>
On Monday 10 November 2003 11:24, Guillaume Houssay wrote:
> 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.
The FOR loop is a plpgsql block not an SQL one. You'll need to write a plpgsql
function if you want to use it.
--
Richard Huxton
Archonet Ltd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, ghoussay@noos.fr
Subject: Re: FOR : Structure control pb
In-Reply-To: <200311101205.05037.dev@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox