From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove bogus assertion about polymorphic SQL function result.
Date: Tue, 17 Mar 2020 18:55:02 +0000
Message-ID: <E1jEHMk-0000c2-AL@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Remove bogus assertion about polymorphic SQL function result.
In-Reply-To: <E1jEHMk-0000c2-AL@gemulon.postgresql.org>
References: <E1jEHMk-0000c2-AL@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox