pgsql: Rearrange use of plpgsql_add_initdatums() so that only the

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Rearrange use of plpgsql_add_initdatums() so that only the
Дата
Msg-id 20070208183715.1AA149FA4B6@postgresql.org
обсуждение исходный текст
Список 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.

Modified Files:
--------------
    pgsql/src/pl/plpgsql/src:
        gram.y (r1.97 -> r1.98)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/gram.y.diff?r1=1.97&r2=1.98)
        pl_comp.c (r1.111 -> r1.112)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_comp.c.diff?r1=1.111&r2=1.112)

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

Предыдущее
От: momjian@postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Fix bug when localized to_char() day or month names were
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix an ancient logic error in plpgsql's exec_stmt_block: it