mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Remove undocumented IS [NOT] OF syntax.
This feature was added a long time ago, in7c1e67bd5
andeb121ba2c
, but never documented in any user-facing way. (Documentation added in6126d3e70
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
This commit is contained in:
@ -762,25 +762,6 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
|
||||
expression must be of Boolean type.
|
||||
</para>
|
||||
|
||||
<!-- IS OF does not conform to the ISO SQL behavior, so it is undocumented here
|
||||
<para>
|
||||
<indexterm>
|
||||
<primary>IS OF</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>IS NOT OF</primary>
|
||||
</indexterm>
|
||||
It is possible to check the data type of an expression using the
|
||||
predicates
|
||||
<synopsis>
|
||||
<replaceable>expression</replaceable> IS OF (typename, ...)
|
||||
<replaceable>expression</replaceable> IS NOT OF (typename, ...)
|
||||
</synopsis>
|
||||
They return a boolean value based on whether the expression's data
|
||||
type is one of the listed data types.
|
||||
</para>
|
||||
-->
|
||||
|
||||
<para>
|
||||
Some comparison-related functions are also available, as shown in <xref
|
||||
linkend="functions-comparison-func-table"/>.
|
||||
|
Reference in New Issue
Block a user