From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove undocumented IS [NOT] OF syntax.
Date: Thu, 19 Nov 2020 22:40:01 +0000
Message-ID: <E1kfsav-00075f-JL@gemulon.postgresql.org> (raw)
Remove undocumented IS [NOT] OF syntax.
This feature was added a long time ago, in 7c1e67bd5 and eb121ba2c,
but never documented in any user-facing way. (Documentation added
in 6126d3e70 was commented out almost immediately, in 8272fc3f7.)
That's because, while this syntax is defined by SQL:99, our
implementation is only vaguely related to the standard's semantics.
The standard appears to intend a run-time not parse-time test, and
it definitely intends that the test should understand subtype
relationships.
No one has stepped up to fix that in the intervening years, but
people keep coming across the code and asking why it's not documented.
Let's just get rid of it: if anyone ever wants to make it work per
spec, they can easily recover whatever parts of this code are still
of value from our git history.
If there's anyone out there who's actually using this despite its
undocumented status, they can switch to using pg_typeof() instead,
eg. "pg_typeof(something) = 'mytype'::regtype". That gives
essentially the same semantics as what our IS OF code did.
(We didn't have that function last time this was discussed, or
we would have ripped out IS OF then.)
Discussion: https://postgr.es/m/CAKFQuwZ2pTc-DSkOiTfjauqLYkNREeNZvWmeg12Q-_69D+sYZA@mail.gmail.com
Discussion: https://postgr.es/m/BAY20-F23E9F2B4DAB3E4E88D3623F99B0@phx.gbl
Discussion: https://postgr.es/m/3E7CF81D.1000203@joeconway.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/926fa801ac9eb54c5275472271ec63a059904698
Modified Files
--------------
doc/src/sgml/func.sgml | 19 -------------
src/backend/catalog/sql_features.txt | 2 +-
src/backend/nodes/outfuncs.c | 4 ---
src/backend/parser/gram.y | 16 -----------
src/backend/parser/parse_expr.c | 54 ------------------------------------
src/include/nodes/parsenodes.h | 1 -
src/test/regress/expected/arrays.out | 16 +++++------
src/test/regress/expected/domain.out | 22 ++++++---------
src/test/regress/expected/with.out | 28 +++++++++----------
src/test/regress/sql/arrays.sql | 4 +--
src/test/regress/sql/domain.sql | 5 ++--
src/test/regress/sql/with.sql | 6 ++--
12 files changed, 38 insertions(+), 139 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 undocumented IS [NOT] OF syntax.
In-Reply-To: <E1kfsav-00075f-JL@gemulon.postgresql.org>
References: <E1kfsav-00075f-JL@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