Re: plpgsql FOR loop doesn't guard against strange step values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: plpgsql FOR loop doesn't guard against strange step values
Date: 2007-07-15 00:04:08
Message-ID: 26690.1184457848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I suspect we have a significant incompatibility with PLSQL in this area.

Ugh. Google seems to confirm your thought that Oracle expects

> FOR i IN REVERSE 1..10 LOOP

which is not the way we are doing it. Not sure if it's worth trying to
fix this --- the conversion pain would be significant. I agree we gotta
document it, however; will go do so.

Note that in the Oracle worldview it still wouldn't be sensible to use
a negative step.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-07-15 00:15:09 Re: plpgsql FOR loop doesn't guard against strange step values
Previous Message Tom Lane 2007-07-14 23:52:37 Re: plpgsql and qualified variable names