pgsql: Improve plpgsql's ability to handle arguments declared as RECORD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve plpgsql's ability to handle arguments declared as RECORD
Дата
Msg-id E1oZF3g-000dNo-0n@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve plpgsql's ability to handle arguments declared as RECORD.

Treat arguments declared as RECORD as if that were a polymorphic type
(which it is, sort of), in that we substitute the actual argument type
while forming the function cache lookup key.  This allows the specific
composite type to be known in some cases where it was not before,
at the cost of making a separate function cache entry for each named
composite type that's passed to the function during a session.  The
particular symptom discussed in bug #17610 could be solved in other
more-efficient ways, but only at the cost of considerable development
work, and there are other cases where we'd still fail without this.

Per bug #17610 from Martin Jurča.  Back-patch to v11 where we first
allowed plpgsql functions to be declared as taking type RECORD.

Discussion: https://postgr.es/m/17610-fb1eef75bf6c2364@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c18d946e2352e0909cdb5aa4548ebe569ebb9fcb

Modified Files
--------------
src/pl/plpgsql/src/expected/plpgsql_record.out | 35 ++++++++++++++++++++++++++
src/pl/plpgsql/src/pl_comp.c                   | 34 ++++++++++++++++++++++---
src/pl/plpgsql/src/sql/plpgsql_record.sql      | 11 ++++++++
3 files changed, 76 insertions(+), 4 deletions(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: aix: xlc: Use -Wl,-b,expfull for old compiler versions
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix race condition in stats.sql added in 5264add7847