Re: Should we document IS [NOT] OF? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Should we document IS [NOT] OF?
Date
Msg-id 1026392.1605766608@sss.pgh.pa.us
Whole thread Raw
In response to Should we document IS [NOT] OF?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Should we document IS [NOT] OF?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Over in news [1] Josh Drake and Eric Ridge discovered the undocumented
> feature "IS [NOT] OF"; introduced seemingly as an "oh-by-the-way" in 2002
> via commit eb121ba2cfe [2].

> Is there any reason not to document this back to 9.5,

As far as I can tell from reading the SQL spec, this has nothing much in
common with the SQL feature of that name except for the syntax.  The SQL
feature seems to be a *run time* test on subtype inclusion, not something
that can be answered in parse analysis.  Even if I'm getting that wrong,
it's clear that the spec intends IS OF to return true for subtype
relationships, not only exact type equality which is the only thing
transformAExprOf considers.

So my vote would be to rip it out, not document it.  Somebody can try
again in future, perhaps.  But if we document it we're just locking
ourselves into a SQL incompatibility.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Next
From: torikoshia
Date:
Subject: Re: [doc] adding way to examine the plan type of prepared statements