From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Rearrange use of plpgsql_add_initdatums() so that only the |
Date: | 2007-02-08 18:37:52 |
Message-ID: | 20070208183752.726039FB2B2@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Rearrange use of plpgsql_add_initdatums() so that only the parsing of a
DECLARE section needs to know about it. Formerly, everyplace besides DECLARE
that created variables needed to do "plpgsql_add_initdatums(NULL)" to prevent
those variables from being sucked up as part of a subsequent DECLARE block.
This is obviously error-prone, and in fact the SQLSTATE/SQLERRM patch had
failed to do it for those two variables, leading to the bug recently exhibited
by Asif Ali Rehman: a DECLARE within an exception handler tried to reinitialize
SQLERRM.
Although the SQLSTATE/SQLERRM patch isn't in any pre-8.1 branches, and so
I can't point to a demonstrable failure there, it seems wise to back-patch
this into the older branches anyway, just to keep the logic similar to HEAD.
Tags:
----
REL8_1_STABLE
Modified Files:
--------------
pgsql/src/pl/plpgsql/src:
gram.y (r1.82.2.2 -> r1.82.2.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/gram.y.diff?r1=1.82.2.2&r2=1.82.2.3)
pl_comp.c (r1.94.2.3 -> r1.94.2.4)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_comp.c.diff?r1=1.94.2.3&r2=1.94.2.4)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-02-08 18:37:55 | pgsql: Fix an ancient logic error in plpgsql's exec_stmt_block: it |
Previous Message | Tom Lane | 2007-02-08 18:37:43 | pgsql: Fix an ancient logic error in plpgsql's exec_stmt_block: it |