Re: Error when trying to use a FOR loop - Mailing list pgsql-sql

From George Weaver
Subject Re: Error when trying to use a FOR loop
Date
Msg-id 005301c6ac3d$735dd6b0$6400a8c0@Dell4500
Whole thread Raw
In response to Error when trying to use a FOR loop  ("Kevin Nikiforuk" <Kevin.Nikiforuk@Acrodex.com>)
List pgsql-sql
----- 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-LOOPS

Regards,
George 




pgsql-sql by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: Help with privilages please
Next
From: Richard Broersma Jr
Date:
Subject: Re: simple problem???