Functions and Operators
This page lists every scalar function name and operator that the query engine evaluates, taken from the dispatch code. Aggregates and window functions are on Aggregates and window functions; JSON and array functions are on JSON and arrays; text search functions are on Full-text search. They are named here only where dispatch order matters.
Where functions are evaluated
There are three expression evaluators, and a function is only available where an evaluator has an arm for it.
| Evaluator | Used for | Function handling |
|---|---|---|
evaluate_row_expr |
Expressions over a row: WHERE, SELECT lists, UPDATE ... SET, sort keys |
The canonical function table described on this page |
evaluate_expr |
Constant expressions with no row (SELECT 1 + 2, VALUES, defaults, table-function arguments) |
Its own arms for a subset of names; anything else is passed to evaluate_row_expr with an empty row |
get_expr_value_from_row |
The string-cell projection path used by aggregates and some projections | Delegates function calls to evaluate_row_expr through delegate_to_row_expr
|
(source: src/query/engine.rs, evaluate_row_expr, evaluate_expr, get_expr_value_from_row, delegate_to_row_expr)
delegate_to_row_expr re-types each text cell with parse_string_to_value before calling the row evaluator, and maps an evaluation error to SQL NULL. Three errors are not swallowed: ClickHouse's unknown-function error, division by zero (which PostgreSQL reports as 22012) and invalid-input-syntax type errors. Other errors raised by a function in this path become NULL instead of failing the statement. (source: src/query/engine.rs, delegate_to_row_expr)
Inside evaluate_row_expr a function call is resolved in this order. The first handler that accepts the lower-cased name wins.
(source: src/query/engine.rs, Expr::Function arm of evaluate_row_expr; src/vector/sources.rs, sql_handles; src/query/sqlite_fns.rs, handles; src/query/pgvector.rs, handles; src/query/mssql_funcs.rs, handles)
The result type that a function reports on the wire comes from the Expr::Function arm of infer_expression_type, which is a separate table from the evaluator. A name can appear in one and not the other; the gaps are listed under Typed but not evaluated. (source: src/query/engine.rs, infer_expression_type)
Operators
Binary operators are the variants of BinaryOp; the lexer and parser map the SQL spelling to a variant.
| SQL | Variant | Meaning |
|---|---|---|
= <> != < <= > >=
|
Eq Ne Lt Le Gt Ge
|
Comparison; NULL on either side gives NULL |
AND OR NOT
|
And Or, UnaryOp::Not
|
Three-valued logic |
+ - * / %
|
Add Sub Mul Div Mod
|
Arithmetic; integer / truncates; division by zero raises 22012 |
^ |
Power |
Exponent, float result (in the MySQL dialect ^ is XOR) |
DIV |
IntegerDiv |
MySQL integer division |
<=> |
NullSafeEq |
MySQL null-safe equality; in the PostgreSQL dialect the lexer reads the same token as pgvector cosine distance |
LIKE ~~, NOT LIKE !~~
|
Like |
Pattern match, % and _, backslash escapes the next character |
ILIKE ~~*, NOT ILIKE !~~*
|
ILike |
Case-insensitive LIKE (both sides lower-cased) |
SIMILAR TO, NOT SIMILAR TO
|
lowered to Regexp
|
Pattern converted to a regular expression by similar_to_regex
|
~, REGEXP, RLIKE / !~
|
Regexp |
Regular-expression match / its negation |
~* / !~*
|
RegexpCI |
Case-insensitive regular-expression match / its negation |
\|\| |
Concat |
String concatenation; array concatenation for arrays; jsonb concatenation for jsonb; tsvector concatenation for tsvectors |
@> <@
|
Contains ContainedBy
|
Range, then array, then jsonb containment |
&& |
Overlaps |
Range overlap, else array overlap |
-> ->> #> #>>
|
JsonbGetField JsonbGetFieldText JsonbPathGet JsonbPathGetText
|
JSON field and path access (see JSON and arrays) |
? ?\| ?&
|
JsonbKeyExists JsonbAnyKeyExists JsonbAllKeysExist
|
jsonb key existence |
- (jsonb left side) #-
|
JsonbDeleteKey JsonbDeletePath
|
jsonb deletion |
<-> |
VectorL2Distance |
pgvector Euclidean distance |
<=> |
VectorCosineDistance |
pgvector cosine distance |
<#> |
VectorInnerProduct |
pgvector negative inner product |
<+> |
VectorL1Distance |
pgvector taxicab distance |
& \| #
|
BitwiseAnd BitwiseOr BitwiseXor
|
Integer bitwise operators |
<< >>
|
ShiftLeft ShiftRight
|
Integer shifts (shift count masked to 0..63); for non-integer operands, inet strict containment |
>>= <<=
|
InetContainsEq InetContainedByEq
|
inet containment or equality |
@@ |
TsMatch |
Text search match |
% on two strings |
TrgmSimilarity at evaluation |
similarity(a, b) >= 0.3 |
IS [NOT] DISTINCT FROM |
lowered to And/Or/Eq with IS NULL
|
Null-aware comparison |
IS [NOT] TRUE, IS [NOT] FALSE
|
lowered with coalesce
|
Boolean tests |
BETWEEN, IN (...), IN (subquery), EXISTS
|
Between, InList, InSubquery, Exists
|
As in PostgreSQL |
x op ANY (array or subquery), x op ALL (...)
|
ArrayAny, ArrayAll
|
Quantified comparison |
(source: src/plan/logical.rs, BinaryOp, Expr; src/query/sql/lexer.rs, operator tokens; src/query/sql/parser.rs, parse_comparison_expression, parse_bitwise_expression, parse_similar_to_rest; src/query/engine.rs, BinaryOp arms of evaluate_row_expr, bitwise_values, matches_like_pattern)
The parser never produces BinaryOp::TrgmSimilarity from SQL text. % is parsed as Mod, and the evaluator applies the trigram test when both operands are strings. (source: src/plan/logical.rs, BinaryOp::TrgmSimilarity; src/query/engine.rs, evaluate_row_expr)
Unary operators:
| SQL | Variant | Meaning |
|---|---|---|
-x |
Neg |
Negation |
NOT x |
Not |
Boolean negation; in the MySQL dialect the truth value of a number or string |
x IS NULL, x IS NOT NULL
|
IsNull, IsNotNull
|
Null tests |
\|/ x |
SquareRoot |
Square root |
\|\|/ x |
CubeRoot |
Cube root |
~x |
BitwiseNot |
Bitwise complement |
@ x |
absolute value | Absolute value |
(source: src/plan/logical.rs, UnaryOp; src/query/engine.rs, Expr::UnaryOp arm of evaluate_row_expr)
Differences from PostgreSQL in pattern matching:
-
LIKE ... ESCAPE 'c'is parsed and the escape character is discarded; backslash stays the escape character. (source:src/query/sql/parser.rs, comment "we ignore it for now" inparse_comparison_expression) -
SIMILAR TOhonoursESCAPEbut only accepts a string literal pattern; a column or parameter pattern is a parse error. (source:src/query/sql/parser.rs,parse_similar_to_rest) - Regular expressions use the Rust
regexcrate (Cargo dependencyregex = "1.10"), not PostgreSQL's POSIX ARE engine. Back-references and look-around are not supported by that crate. An invalid pattern makes~return false rather than raising. (source:src/query/engine.rs,matches_regexp_pattern,cached_regex;Cargo.toml) -
matches_like_patternreturns false when either side is NULL. Not verified: whetherx LIKE NULLin aSELECTlist returns NULL as in PostgreSQL. (source:src/query/engine.rs,matches_like_pattern)
Tested by feature-matrix scenarios DML/where-like, where-ilike, where-similar-to, where-regex, where-regex-ci, and diff-corpus queries tagged bitwise (7) and null (14). (source: test-scripts/feature-matrix/features.py; test-scripts/diff/corpus.py)
Conditional expressions
| Function | Notes |
|---|---|
CASE WHEN ... THEN ... ELSE ... END, CASE x WHEN ...
|
Expr::Case |
coalesce(a, b, ...) |
First non-NULL argument |
nullif(a, b) |
NULL when equal |
greatest(...), least(...)
|
NULL arguments ignored, as in PostgreSQL |
if(cond, a, b) |
MySQL |
ifnull(a, b) |
MySQL |
isnull(x), isnotnull(x)
|
ClickHouse |
(source: src/query/engine.rs, evaluate_row_expr, arms coalesce, nullif, greatest, least, if, ifnull, isnull, isnotnull)
Tested by feature-matrix category conditional (case-searched, case-simple, coalesce, nullif-eq, nullif-ne, greatest, least, greatest-null) and diff-corpus tag case (11). (source: test-scripts/feature-matrix/features.py; test-scripts/diff/corpus.py)
Mathematical functions
| Function | Notes |
|---|---|
abs(x) |
|
round(x [, n]) |
Integer and numeric input rounded exactly, ties away from zero; float8 with no n rounds ties to even (PostgreSQL rint); negative n rounds to tens, hundreds and so on |
ceil(x), ceiling(x), floor(x)
|
|
trunc(x [, n]), truncate(x, n)
|
|
mod(a, b) |
|
power(a, b), pow(a, b)
|
|
sqrt(x) |
Negative input raises 2201F |
cbrt(x), exp(x), ln(x)
|
|
log(x), log10(x)
|
Base 10 |
log2(x) |
|
sign(x) |
|
sin, cos, tan, asin, acos, atan, atan2(y, x)
|
Radians |
sinh, cosh, tanh, asinh, acosh, atanh
|
|
pi(), degrees(x), radians(x)
|
|
random(), rand()
|
|
gcd(a, b), lcm(a, b), factorial(n)
|
|
intdiv(a, b) |
ClickHouse integer division |
(source: src/query/engine.rs, evaluate_row_expr, arms abs through random, gcd, lcm, factorial, intdiv; docs/status/2026-11-30-pg-result-types.md)
Tested by feature-matrix category functions-math (abs, round, round-int, ceil, floor, power, sqrt, mod, sign, trunc, int-division, numeric-division, ln, log10, exp, pi, gcd), diff-corpus tag arith (20) and the queries type_math_funcs, sqrt_negative_errors and type_round_float. (source: test-scripts/feature-matrix/features.py; test-scripts/diff/corpus.py)
cot is typed but has no evaluator arm; see Typed but not evaluated.
String functions
| Function | Notes |
|---|---|
length(s), char_length(s), character_length(s)
|
Characters; for bytea, bytes; a non-string argument gives NULL |
octet_length(s) |
Bytes |
lower(s), upper(s)
|
Also return a range's bounds when the argument is a range |
lcase(s), ucase(s)
|
MySQL |
initcap(s) |
|
concat(...) |
NULL arguments skipped; VARIADIC array accepted |
concat_ws(sep, ...) |
|
substring(s, from [, for]), substr(...), substring(s FROM a FOR b), mid(...)
|
1-based |
left(s, n), right(s, n)
|
Negative n drops characters from the other end |
trim(s), btrim(s [, chars]), ltrim(s [, chars]), rtrim(s [, chars])
|
Optional character set |
lpad(s, n [, fill]), rpad(s, n [, fill])
|
|
repeat(s, n), reverse(s)
|
|
replace(s, from, to), replaceall(...)
|
|
translate(s, from, to) |
|
position(sub IN s), strpos(s, sub)
|
1-based, 0 when absent |
locate(sub, s), instr(s, sub)
|
MySQL |
split_part(s, delim, n) |
|
substring_index(s, delim, n) |
MySQL |
regexp_replace(s, pattern, repl [, flags]) |
Flags g (all) and i (case-insensitive); \1 back-references in repl; an invalid pattern returns s unchanged; the MySQL dialect always uses gi
|
format(fmt, ...) |
With a % in the template: PostgreSQL %s, %I, %L, %% and %n$ positions; otherwise MySQL numeric FORMAT(x, d)
|
quote_literal(s), quote_ident(s)
|
|
ascii(s), chr(n), char(n, ...), unicode(s)
|
|
field(s, a, b, ...) |
MySQL |
insert(s, pos, len, new) |
MySQL |
md5(s) |
Lower-case hex digest |
hex(x), unhex(s)
|
MySQL |
to_hex(n) |
|
encode(bytes, fmt), decode(text, fmt)
|
Two-argument PostgreSQL forms; not in the MySQL dialect |
digest(data, algo) |
pgcrypto: md5, sha1, sha224, sha256, sha384, sha512; returns bytea; any other name raises No such hash algorithm
|
gen_random_uuid(), uuid_generate_v4()
|
|
unaccent(s), similarity(a, b) and other text search helpers |
See Full-text search |
convert_using(s, charset), binary(s)
|
MySQL CONVERT(... USING ...) and BINARY s
|
mask_full(s) |
Returns *** for a non-NULL value |
match_text(s, query) |
True when every whitespace-separated term of query occurs in s, case-insensitively |
(source: src/query/engine.rs, evaluate_row_expr, arms of the same names, pgcrypto_digest; Cargo.toml, sha1, sha2, md-5, md5)
mask_full and match_text are SynergyDB-specific names; they are not PostgreSQL functions. (source: src/query/engine.rs, arms mask_full, match_text)
Tested by feature-matrix category functions-string (length, char-length, substring, substr, upper, lower, initcap, trim, ltrim-set, rtrim-set, btrim-set, split-part, regexp-replace, regexp-replace-g, left, left-neg, right, right-neg, concat, concat-ws, concat-op, lpad, rpad, position, strpos, format, replace, reverse, repeat, ascii, chr, md5, to-hex) and diff-corpus tag string (18). (source: test-scripts/feature-matrix/features.py; test-scripts/diff/corpus.py)
starts_with is listed by is_pure_scan_function but has no evaluator arm, so in the PostgreSQL dialect it returns NULL. Not verified: no test covers it. (source: src/query/engine.rs, is_pure_scan_function)
Date and time
| Function | Notes |
|---|---|
now(), current_timestamp, transaction_timestamp(), statement_timestamp()
|
The statement start time, ISO text with a UTC suffix |
clock_timestamp() |
The wall clock at the call |
localtimestamp |
|
current_date, curdate()
|
|
sysdate() |
MySQL only |
date_trunc(field, ts) |
Fields microseconds, milliseconds, second, minute, hour, day, week, month, quarter, year, decade, century, millennium; an unknown field gives NULL |
extract(field FROM x), date_part(field, x)
|
Fields century, day, decade, dow, doy, epoch, hour, isodow, isoyear, microsecond(s), millennium, millisecond(s), minute, month, quarter, second, week, year, and MySQL compound units such as day_hour
|
age(a [, b]) |
|
to_char(x, fmt) |
Date patterns YYYY, YY, MM, MON, Mon, MONTH, Month, DD, DDD, DY, Dy, DAY, Day, HH, HH12, HH24, MI, SS, MS, US, AM, PM, Q, IW, WW, FM; numeric patterns 9, 0, ., D, S, MI, $, L, EEEE, FM
|
to_timestamp(text, fmt), to_timestamp(epoch), to_date(text, fmt)
|
|
make_date(y, m, d), make_time(h, m, s), make_timestamp(...), make_timestamptz(...)
|
|
make_interval(...) |
Named (days => 3) and positional arguments |
at_time_zone(ts, zone) |
What ts AT TIME ZONE zone parses to |
year, month, day, dayofmonth, hour, minute, second, dayofweek, dayofyear, quarter, weekday, date
|
MySQL extractors |
date_add, date_sub, datediff, timestampdiff, timestampadd, date_format
|
MySQL; the two-argument date_add(ts, interval) is the PostgreSQL 16 form |
toyear, tomonth, todayofmonth, todate
|
ClickHouse |
(source: src/query/engine.rs, evaluate_row_expr, arms of the same names, sql_now, date_trunc_field, to_char_timestamp, to_char_number, parse_make_interval_args in src/query/sql/parser.rs)
Differences from PostgreSQL:
-
now()andtransaction_timestamp()return the start of the current statement, not of the current transaction, so two statements in one transaction see different values. (source:src/query/engine.rs,sql_now) -
current_timeandlocaltimeare evaluated only in the MySQL dialect; in the PostgreSQL dialect they return NULL. (source:src/query/engine.rs,mysql_clock_value) -
to_charwith a numeric template formats throughf64, so values with more than about 15 significant digits lose precision. (source:src/query/engine.rs,to_char_number)
Tested by feature-matrix category functions-datetime (current-date-type, date-trunc, extract-year, extract-dow, date-part, age, to-char-date, to-char-num, to-timestamp, interval-add, interval-sub, timestamp-diff, make-date, extract-epoch), diff-corpus queries type_now, type_date_funcs, type_to_char, type_age_interval, and the unit test test_make_interval_named_and_positional. (source: test-scripts/feature-matrix/features.py; test-scripts/diff/corpus.py; src/query/engine.rs, tests)
Vector functions
These names are handled by pgvector::call before the main table. A public. prefix is accepted.
| Function | Notes |
|---|---|
l2_distance(a, b), cosine_distance(a, b), inner_product(a, b), negative_inner_product(a, b), vector_negative_inner_product(a, b), l1_distance(a, b)
|
Same arithmetic as the operators: float accumulation, final step in double |
vector_dims(v), vector_norm(v), l2_normalize(v)
|
|
binary_quantize(v), subvector(v, start, count)
|
|
vector_to_float4(v), vector_to_real_array(v)
|
Conversion to real[]
|
The collection functions vector_collection_create, vector_collection_drop, vector_collection_sync and embed are handled by vector::sources and are described in HNSW and vectors. (source: src/query/pgvector.rs, handles, call, distance; src/vector/sources.rs, sql_handles)
Tested by unit tests io_and_errors and ops_and_functions. (source: src/query/pgvector.rs, tests)
Type conversion functions
| Function | Notes |
|---|---|
CAST(x AS t), x::t
|
See Data types |
try_cast(x, 't') |
NULL instead of an error |
toint8 … toint64, touint8 … touint64, tofloat32, tofloat64
|
ClickHouse |
formatreadablesize(n) |
ClickHouse |
(source: src/query/engine.rs, evaluate_row_expr, arms try_cast, toint8 and following, formatreadablesize)
Session, catalog and system functions
These return session state or emulate PostgreSQL catalog helpers. Their catalog behaviour is covered in System catalogs and Session settings.
| Function | Notes |
|---|---|
current_user, session_user, user, current_role, system_user
|
No arguments |
current_database(), current_catalog, database(), schema()
|
|
current_schema() |
First schema of search_path (PostgreSQL dialect) |
current_schemas(bool) |
|
current_setting(name), set_config(name, value, is_local)
|
|
version() |
Constant evaluator only |
pg_backend_pid(), connection_id()
|
connection_id is MySQL |
pg_is_in_recovery() |
|
pg_encoding_to_char(n) |
Returns UTF8
|
pg_table_is_visible, pg_type_is_visible, pg_function_is_visible
|
|
pg_has_role, has_*_privilege
|
|
pg_get_userbyid, pg_get_expr, pg_get_serial_sequence
|
|
to_regclass(name), to_regtype(name), format_type(oid, typmod)
|
|
obj_description, col_description, shobj_description
|
NULL; see the note below |
last_insert_id() |
|
nextval(seq) |
One-argument form; currval and setval are covered in Constraints and sequences
|
enum_range, enum_first, enum_last
|
See Data types |
type(r), labels(n), keys(n), id(n)
|
Cypher helpers for graph results |
(source: src/query/engine.rs, evaluate_row_expr, arms of the same names)
obj_description and col_description return NULL: the evaluate_row_expr arm carries the comment that COMMENT ON is not stored, and the catalog handler's answer is also NULL (System catalogs covers both paths). This contradicts Statements, which says COMMENT ON text is returned by obj_description. (source: src/query/engine.rs, obj_description arm; src/protocol/postgres/catalog.rs, obj_description)
hstore and ranges
akeys, avals, hstore_to_json, hstore_to_jsonb, exist, defined and the two-argument hstore(k, v) operate on hstore text; h -> 'k' returns the value as text. The range constructors and accessors are covered in Data types. (source: src/query/engine.rs, hstore arms of evaluate_row_expr, jsonb_get_field)
Tested by feature-matrix scenario DDL-types/hstore. (source: test-scripts/feature-matrix/features.py)
Dialect-only and internal names
Some functions are reachable only from another wire's dialect or only under an internal prefix that the dialect parser writes:
| Prefix or condition | Handler | Purpose |
|---|---|---|
__sqlite_ |
sqlite_fns |
SQLite functions rewritten by the SQLite front end |
__tds_, __ora_
|
mssql_funcs |
SQL Server and Oracle functions rewritten by those front ends |
ora_regexp_substr, ora_regexp_instr, ora_regexp_count, ora_instr
|
main table | Oracle regular-expression and INSTR forms |
| MySQL dialect |
mysql_funcs, MySQL clock |
MySQL functions and CURRENT_TIME, SYSDATE and similar |
(source: src/query/sqlite_fns.rs, handles; src/query/mssql_funcs.rs, handles; src/query/engine.rs, evaluate_row_expr, mysql_clock_value)
The wire pages under wires describe which dialect each wire uses.
Constant-only functions
The following names have an arm in evaluate_expr but none in evaluate_row_expr. They work in a constant SELECT, but over a column value they reach the fallback and return NULL. A code comment on the array_to_string arm states that some array functions are implemented only by the constant evaluator.
| Function | Constant form works | Over a column |
|---|---|---|
array_position(a, x) |
yes | NULL |
array_prepend(x, a) |
yes | NULL |
string_to_array(s, delim) |
yes | NULL |
row(...) as a function name |
yes | NULL |
uuid() |
yes | NULL |
version() |
yes | NULL |
(source: src/query/engine.rs, Expr::Function arms of evaluate_expr and evaluate_row_expr, comment on the array_to_string arm)
array_to_string, array_slice and at_time_zone have row arms that evaluate their arguments and then hand the call to the constant evaluator, so they do work over columns. (source: same)
Not verified: the column behaviour of the functions in the table. The feature-matrix scenarios functions-array/prepend and functions-array/position and the diff-corpus query type_string_to_array use constant arguments only. (source: test-scripts/feature-matrix/features.py; test-scripts/diff/corpus.py)
Typed but not evaluated
These names have a result type in infer_expression_type (so a client sees a sensible column type) but no evaluator arm in the PostgreSQL dialect. They return NULL through the unknown-name fallback.
| Function | Reported type | Note |
|---|---|---|
array_lower, array_upper, array_ndims
|
int4 | |
array_to_json |
json | |
cot |
float8 | |
current_time, localtime
|
time | Evaluated in the MySQL dialect only |
json_object, jsonb_object
|
json / jsonb | |
jsonb_insert, jsonb_set_lax
|
jsonb | |
nvl |
argument type | |
regexp_match |
text[] | |
regexp_matches as a scalar |
text[] | The table-function form works; see below |
regexp_split_to_array |
text[] | The status note on result types lists this as typed |
uuid_generate_v1 |
uuid |
(source: src/query/engine.rs, infer_expression_type, evaluate_row_expr; docs/status/2026-11-30-pg-result-types.md)
Not verified: no test exercises these names, so the NULL result is read from the code only.
Set-returning functions
A set-returning function can appear in FROM or in a SELECT list.
In FROM
execute_table_function handles these names. Their arguments are evaluated with the constant evaluator evaluate_expr.
| Function | Rows produced |
|---|---|
generate_series(start, stop [, step]) |
Integers, numerics, dates or timestamps with an interval step |
unnest(a [, b, ...]) [WITH ORDINALITY] |
One row per element; several arrays give one column each (unnest_1, unnest_2, …), shorter ones padded with NULL |
regexp_matches(s, pattern [, flags]) |
One row per match, the capture groups as a text array; flags g and i
|
regexp_split_to_table(s, pattern) |
One row per piece |
json_each, jsonb_each, json_each_text, jsonb_each_text
|
key, value
|
json_array_elements, jsonb_array_elements, ..._text
|
value |
json_to_record, jsonb_to_record, json_to_recordset, jsonb_to_recordset
|
Columns from the AS t(col type, ...) list |
sdb_flatten(v [, outer, mode]) |
Snowflake FLATTEN as the Snowflake wire rewrites it: columns SEQ, KEY, PATH, INDEX, VALUE, THIS; one row per array element or object key |
pg_get_keywords() |
Keyword list |
pg_control_system(), pg_control_checkpoint()
|
Emulated control-file values |
vector_search(...) |
Vector collection search; see HNSW and vectors |
kafka_consume(...), kafka(...)
|
Messages from the Kafka integration |
| any scalar function | A one-row relation holding its result |
A zero-argument name that is not a table function and evaluates to NULL raises Unknown table function. (source: src/query/engine.rs, execute_table_function)
In a SELECT list
srf_args and json_srf_kind expand these calls in a projection, producing one output row per element: unnest(a) with one argument, generate_series(a, b [, step]), json_array_elements, jsonb_array_elements, their _text forms, and json_object_keys, jsonb_object_keys. (source: src/query/engine.rs, srf_args, json_srf_kind, JsonSrf)
Tested by feature-matrix category set-returning (generate-series-int, generate-series-step, generate-series-date, unnest-srf, regexp-matches, regexp-split-to-table, generate-series-in-select), functions-array/unnest-with-ordinality, functions-json/array-elements and functions-json/each, and the diff-corpus query type_generate_series. (source: test-scripts/feature-matrix/features.py; test-scripts/diff/corpus.py)
Unknown function names
A call to a name that no handler accepts does not raise an error in the PostgreSQL, MySQL, SQL Server or SQLite dialects. The fallback arm of evaluate_row_expr evaluates the arguments (so an argument error still surfaces), tries a user-defined function of that name with try_eval_udf, and if there is none returns SQL NULL. Only the ClickHouse dialect raises Unknown function <name>. (source: src/query/engine.rs, _ arm of the function match in evaluate_row_expr)
So SELECT no_such_fn(1) returns one row with a NULL column, where PostgreSQL raises SQLSTATE 42883 (undefined_function). Engine code does not produce 42883. A misspelled function name therefore shows up as unexpected NULLs, not as an error. (source: same; Statements)
The same rule applies to the constant-only and typed but not evaluated names whenever they reach the row evaluator.
In FROM, a zero-argument unknown name raises Unknown table function; with arguments, the name is treated as a scalar function and yields one NULL row. (source: src/query/engine.rs, execute_table_function)
pg_notify is not in the dispatch table and falls under this rule. NOTIFY as a statement is described in the PostgreSQL protocol reference. (source: src/query/engine.rs, evaluate_row_expr)