From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove bogus assertion about polymorphic SQL function result. |
Date: | 2020-03-17 18:55:02 |
Message-ID: | E1jEHMk-0000c2-AL@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-03-17 19:05:36 | pgsql: Doc: clarify behavior of "anyrange" pseudo-type. |
Previous Message | Tom Lane | 2020-03-17 16:09:44 | pgsql: Use pkg-config, if available, to locate libxml2 during configure |