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

pgsql: Fix GET DIAGNOSTICS for case of assignment to function's firstv

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix GET DIAGNOSTICS for case of assignment to function's firstv
Date: 2012-03-22 18:14:50
Message-ID: E1SAmXC-0006Ed-F4@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix GET DIAGNOSTICS for case of assignment to function's first variable.

An incorrect and entirely unnecessary "safety check" in exec_stmt_getdiag()
caused the code to treat an assignment to a variable with dno zero as a
no-op.  Unfortunately, that's a perfectly valid dno.  This has been broken
since GET DIAGNOSTICS was invented.  It's not terribly surprising that the
bug went unnoticed for so long, since in most cases you probably wouldn't
use the function's first-created variable (normally its first parameter)
as a GET DIAGNOSTICS target.  Nonetheless, it's broken.  Per bug #6551
from Adam Buraczewski.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/38350a496509d6aa4dc481b1f9f143a136e4c661

Modified Files
--------------
src/pl/plpgsql/src/pl_exec.c |   10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2012-03-22 19:41:12
Subject: pgsql: Update docs on numeric storage requirements.
Previous:From: Tom LaneDate: 2012-03-22 16:09:19
Subject: pgsql: Refactor to eliminate duplicate copies of conninfodefault-findi

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