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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix GET DIAGNOSTICS for case of assignment to function's first v
Дата
Msg-id E1SAmXC-0006Eb-E4@gemulon.postgresql.org
обсуждение исходный текст
Список 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_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/543e5ab8be9d10fe3bf28effa2bd929f827d8793

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


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix GET DIAGNOSTICS for case of assignment to function's first v
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix GET DIAGNOSTICS for case of assignment to function's first v