pgsql: Clean up/tighten up coercibility checks in opr_sanity regression

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Clean up/tighten up coercibility checks in opr_sanity regression
Date: 2018-10-14 16:11:24
Message-ID: E1gBizE-0001Y1-IN@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clean up/tighten up coercibility checks in opr_sanity regression test.

With the removal of the old abstime type, there are no longer any cases
in this test where we need to use the weaker castcontext-ignoring form
of binary coercibility check. (The other major source of such headaches,
apparently-incompatible hash functions, is now hashvalidate()'s problem
not this test script's problem.) Hence, just use binary_coercible()
everywhere, and remove the comments explaining why we don't do so ---
which were broken anyway by cda6a8d01.

I left physically_coercible() in place but renamed it to better
match what it's actually testing, and added some comments.

Also, in test queries that have an assumption about the maximum number
of function arguments they need to handle, add a clause to make them fail
if someday there's a relevant function with more arguments. Otherwise
we're likely not to notice that we need to extend the queries.

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

Branch
------
master

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

Modified Files
--------------
src/test/regress/expected/opr_sanity.out | 55 ++++++++++++++++++--------------
src/test/regress/sql/opr_sanity.sql | 55 ++++++++++++++++++--------------
2 files changed, 62 insertions(+), 48 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-10-14 17:07:46 pgsql: Use PlaceHolderVars within the quals of a FULL JOIN.
Previous Message Tom Lane 2018-10-14 14:41:29 Re: pgsql: Add list of acknowledgments to release notes