You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IS UNKNOWN predicate in Postgres is used to test if an expression
returns an unknown value, which is typically represented by a NULL.
This predicate can be used with various expressions, such as boolean
expressions, to check if the result is unknown due to the presence of NULL values.
Parameters
expression: The expression to be tested for an unknown value.
Returns
The predicate returns true if the expression result is unknown
(NULL), and false otherwise.
Examples
SELECT (NULLAND true) IS UNKNOWN; -- Returns trueSELECT (NULLAND false) IS UNKNOWN; -- Returns trueSELECT (true AND false) IS UNKNOWN; -- Returns false
In these examples, the IS UNKNOWN predicate tests if the result of
boolean expressions is unknown due to the presence of NULL values.
See Also
IS NULL: Tests if an expression returns a NULL value.
IS NOT UNKNOWN: Tests if an expression does not return an unknown
value.
COALESCE: Returns the first non-null argument or null if all
arguments are null.
Compatibility
The IS UNKNOWN predicate is compatible with PostgreSQL and is part of
the SQL standard.
The text was updated successfully, but these errors were encountered:
Notice that IS UNKNOWN and IS NOT UNKNOWN are effectively the same as IS NULL and IS NOT NULL, respectively, except that the input expression must be of Boolean type.
Given we already support IS [NOT] NULL, we just need to check argument type and then bind to the same expr type... and add the missing parser support.
Syntax
Description
The
IS UNKNOWN
predicate in Postgres is used to test if an expressionreturns an unknown value, which is typically represented by a
NULL
.This predicate can be used with various expressions, such as boolean
expressions, to check if the result is unknown due to the presence of
NULL
values.Parameters
expression
: The expression to be tested for an unknown value.Returns
The predicate returns
true
if the expression result is unknown(
NULL
), andfalse
otherwise.Examples
In these examples, the
IS UNKNOWN
predicate tests if the result ofboolean expressions is unknown due to the presence of
NULL
values.See Also
IS NULL
: Tests if an expression returns aNULL
value.IS NOT UNKNOWN
: Tests if an expression does not return an unknownvalue.
COALESCE
: Returns the first non-null argument or null if allarguments are null.
Compatibility
The
IS UNKNOWN
predicate is compatible with PostgreSQL and is part ofthe SQL standard.
The text was updated successfully, but these errors were encountered: