shankha <shankhabaner...@gmail.com> writes:
> PREPARE updatearrayplan(BigInt[], BigInt[]) AS
>         for i in size($1)
>         DO
>             update s.t1
>             SET c3 = $2[$i]
>             WHERE c2 = $1[$i]
>         END FOR

> In this prepared statement I am just trying to explain the algorithm.
> I do not know the exact syntax.

You would need to write a plpgsql function in order to have a loop like
that; there's no loops in bare SQL.

                        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to