From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Kevin Nikiforuk <Kevin.Nikiforuk@Acrodex.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Error when trying to use a FOR loop
Date: Thu, 20 Jul 2006 13:19:25 -0700 (PDT)
Message-ID: <20060720131715.M89811@megazone.bigpanda.com> (raw)
In-Reply-To: <6EA72AC41F81D242A38AAF505523A94D022DF2@kappa.acrodex.net>
References: <6EA72AC41F81D242A38AAF505523A94D022DF2@kappa.acrodex.net>
On Thu, 20 Jul 2006, Kevin Nikiforuk wrote:
> Sorry if this is in the archives, but I've done a search and couldn't
> find anything relevant. I'm running HP's precompiled version of 8.1.3.1
> as part of their Internet Express offering, and I can't seem to run a
> for loop. Here's what I'm seeing:
>
> xp512-0715-0716=# FOR LV in 1..10 LOOP
>
> xp512-0715-0716-# select * from ldevrg;
>
> ERROR: syntax error at or near "FOR" at character 1
>
> LINE 1: FOR LV in 1..10 LOOP
I think the problem is that the FOR is a pl/pgsql construct and isn't
allowed in straight sql contexts but only inside a function.
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: sszabo@megazone.bigpanda.com, Kevin.Nikiforuk@Acrodex.com
Subject: Re: Error when trying to use a FOR loop
In-Reply-To: <20060720131715.M89811@megazone.bigpanda.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