pgsql: Remove bogus assertion about polymorphic SQL function result.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Remove bogus assertion about polymorphic SQL function result.
Дата
Msg-id E1jEHMk-0000c2-AL@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Remove bogus assertion about polymorphic SQL function result.

It is possible to reach check_sql_fn_retval() with an unresolved
polymorphic rettype, resulting in an assertion failure as demonstrated
by one of the added test cases.  However, the code following that
throws what seems an acceptable error message, so just remove the
Assert and adjust commentary.

While here, I thought it'd be a good idea to provide some parallel
tests of SQL-function and PL/pgSQL-function polymorphism behavior.
Some of these cases are perhaps duplicative of tests elsewhere,
but we hadn't any organized coverage of the topic AFAICS.

Although that assertion's been wrong all along, it won't have any
effect in production builds, so I'm not bothering to back-patch.

Discussion: https://postgr.es/m/21569.1584314271@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d9784c840f3ac98eb41d021c981eea0fe1735ed

Modified Files
--------------
src/backend/executor/functions.c           | 20 ++++----
src/test/regress/expected/plpgsql.out      | 77 +++++++++++++++++++++++++++++
src/test/regress/expected/polymorphism.out | 78 +++++++++++++++++++++++++++++-
src/test/regress/sql/plpgsql.sql           | 60 +++++++++++++++++++++++
src/test/regress/sql/polymorphism.sql      | 58 +++++++++++++++++++++-
5 files changed, 279 insertions(+), 14 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Use pkg-config, if available, to locate libxml2 during configure
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: clarify behavior of "anyrange" pseudo-type.