From: George Weaver <gweaver@shaw.ca>
To: Kevin Nikiforuk <Kevin.Nikiforuk@Acrodex.com>
To: pgsql-sql@postgresql.org
Subject: Re: Error when trying to use a FOR loop
Date: Thu, 20 Jul 2006 15:45:34 -0500
Message-ID: <005301c6ac3d$735dd6b0$6400a8c0@Dell4500> (raw)
References: <6EA72AC41F81D242A38AAF505523A94D022DF2@kappa.acrodex.net>
----- Original Message From: "Kevin Nikiforuk"
<snip>
>xp512-0715-0716=# FOR LV in 1..10 LOOP
<snip>
It appears that you are trying to use the For .. Loop structure from the
psql command line. This structure is not plain SQL - its meant to be used
within PL/pgSQL. Have you tried incorporating it into a PL/pgSQL function?
See
http://www.postgresql.org/docs/8.1/static/plpgsql-control-structures.html#PLPGSQL-CONTROL-STRUCTURES...
Regards,
George
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: gweaver@shaw.ca, Kevin.Nikiforuk@Acrodex.com
Subject: Re: Error when trying to use a FOR loop
In-Reply-To: <005301c6ac3d$735dd6b0$6400a8c0@Dell4500>
* 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