pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove bogus Assert, add some regression test cases showing why.
Date: Sat, 04 Apr 2020 22:03:36 +0000
Message-ID: <E1jKqt6-0006FU-IE@gemulon.postgresql.org> (raw)

Remove bogus Assert, add some regression test cases showing why.

Commit 77ec5affb added an assertion to enforce_generic_type_consistency
that boils down to "if the function result is polymorphic, there must be
at least one polymorphic argument".  This should be true for user-created
functions, but there are built-in functions for which it's not true, as
pointed out by Jaime Casanova.  Hence, go back to the old behavior of
leaving the return type alone.  There's only a limited amount of stuff
you can do with such a function result, but it does work to some extent;
add some regression test cases to ensure we don't break that again.

Discussion: https://postgr.es/m/CAJGNTeMbhtsCUZgJJ8h8XxAJbK7U2ipsX8wkHRtZRz-NieT8RA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/07871d40c72e498b6e034eb674df5d8d206976bc

Modified Files
--------------
src/backend/parser/parse_coerce.c          | 21 ++++++++++++---------
src/test/regress/expected/polymorphism.out | 13 +++++++++++++
src/test/regress/sql/polymorphism.sql      |  5 +++++
3 files changed, 30 insertions(+), 9 deletions(-)



Message-ID: <E1jKqt6-0006FU-IE@gemulon.postgresql.org>
Permalink:  ../E1jKqt6-0006FU-IE@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jKqt6-0006FU-IE@gemulon.postgresql.org

 · 

reply

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 Assert, add some regression test cases showing why.
  In-Reply-To: <E1jKqt6-0006FU-IE@gemulon.postgresql.org>
  References: <E1jKqt6-0006FU-IE@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