Skip site navigation (1) Skip section navigation (2)

pgsql: Reject zero or negative BY step in plpgsql integer FOR-loops, and

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reject zero or negative BY step in plpgsql integer FOR-loops, and
Date: 2007-07-15 02:15:04
Message-ID: 20070715021504.A63E09FB2B4@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Reject zero or negative BY step in plpgsql integer FOR-loops, and behave
sanely if the loop value overflows int32 on the way to the end value.
Avoid useless computation of "SELECT 1" when BY is omitted.  Avoid some
type-punning between Datum and int4 that dates from the original coding.

Modified Files:
--------------
    pgsql/src/pl/plpgsql/src:
        gram.y (r1.102 -> r1.103)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/gram.y.diff?r1=1.102&r2=1.103)
        pl_exec.c (r1.197 -> r1.198)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c.diff?r1=1.197&r2=1.198)
        pl_funcs.c (r1.59 -> r1.60)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_funcs.c.diff?r1=1.59&r2=1.60)
        plpgsql.h (r1.88 -> r1.89)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h.diff?r1=1.88&r2=1.89)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-07-15 22:18:24
Subject: pgsql: Because plpgsql's scanner uses %option case-insensitive, flex's
Previous:From: Tom LaneDate: 2007-07-15 00:45:17
Subject: pgsql: Note incompatibility with Oracle's version of FOR ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group