jed

Functions & operators

The operator, aggregate, and set-returning catalog, generated at build time from spec/functions/catalog.toml. null describes NULL behavior (for example, kleene three-valued logic, or strict = NULL in, NULL out).

Operators

NameKindArgument typesResultNULL
orlogicalboolean, booleanbooleankleene
andlogicalboolean, booleanbooleankleene
notlogicalbooleanbooleanpropagates
eqcomparisoninteger, integerbooleanpropagates
necomparisoninteger, integerbooleanpropagates
ltcomparisoninteger, integerbooleanpropagates
gtcomparisoninteger, integerbooleanpropagates
lecomparisoninteger, integerbooleanpropagates
gecomparisoninteger, integerbooleanpropagates
is_distinct_fromcomparisoninteger, integerbooleannull_safe
is_not_distinct_fromcomparisoninteger, integerbooleannull_safe
eqcomparisontext, textbooleanpropagates
necomparisontext, textbooleanpropagates
ltcomparisontext, textbooleanpropagates
gtcomparisontext, textbooleanpropagates
lecomparisontext, textbooleanpropagates
gecomparisontext, textbooleanpropagates
is_distinct_fromcomparisontext, textbooleannull_safe
is_not_distinct_fromcomparisontext, textbooleannull_safe
likecomparisontext, textbooleanpropagates
ilikecomparisontext, textbooleanpropagates
regex_matchcomparisontext, textbooleanpropagates
regex_imatchcomparisontext, textbooleanpropagates
eqcomparisonboolean, booleanbooleanpropagates
necomparisonboolean, booleanbooleanpropagates
ltcomparisonboolean, booleanbooleanpropagates
gtcomparisonboolean, booleanbooleanpropagates
lecomparisonboolean, booleanbooleanpropagates
gecomparisonboolean, booleanbooleanpropagates
is_distinct_fromcomparisonboolean, booleanbooleannull_safe
is_not_distinct_fromcomparisonboolean, booleanbooleannull_safe
eqcomparisondecimal, decimalbooleanpropagates
necomparisondecimal, decimalbooleanpropagates
ltcomparisondecimal, decimalbooleanpropagates
gtcomparisondecimal, decimalbooleanpropagates
lecomparisondecimal, decimalbooleanpropagates
gecomparisondecimal, decimalbooleanpropagates
is_distinct_fromcomparisondecimal, decimalbooleannull_safe
is_not_distinct_fromcomparisondecimal, decimalbooleannull_safe
eqcomparisonbytea, byteabooleanpropagates
necomparisonbytea, byteabooleanpropagates
ltcomparisonbytea, byteabooleanpropagates
gtcomparisonbytea, byteabooleanpropagates
lecomparisonbytea, byteabooleanpropagates
gecomparisonbytea, byteabooleanpropagates
is_distinct_fromcomparisonbytea, byteabooleannull_safe
is_not_distinct_fromcomparisonbytea, byteabooleannull_safe
eqcomparisonuuid, uuidbooleanpropagates
necomparisonuuid, uuidbooleanpropagates
ltcomparisonuuid, uuidbooleanpropagates
gtcomparisonuuid, uuidbooleanpropagates
lecomparisonuuid, uuidbooleanpropagates
gecomparisonuuid, uuidbooleanpropagates
is_distinct_fromcomparisonuuid, uuidbooleannull_safe
is_not_distinct_fromcomparisonuuid, uuidbooleannull_safe
eqcomparisontimestamp, timestampbooleanpropagates
necomparisontimestamp, timestampbooleanpropagates
ltcomparisontimestamp, timestampbooleanpropagates
gtcomparisontimestamp, timestampbooleanpropagates
lecomparisontimestamp, timestampbooleanpropagates
gecomparisontimestamp, timestampbooleanpropagates
is_distinct_fromcomparisontimestamp, timestampbooleannull_safe
is_not_distinct_fromcomparisontimestamp, timestampbooleannull_safe
eqcomparisontimestamptz, timestamptzbooleanpropagates
necomparisontimestamptz, timestamptzbooleanpropagates
ltcomparisontimestamptz, timestamptzbooleanpropagates
gtcomparisontimestamptz, timestamptzbooleanpropagates
lecomparisontimestamptz, timestamptzbooleanpropagates
gecomparisontimestamptz, timestamptzbooleanpropagates
is_distinct_fromcomparisontimestamptz, timestamptzbooleannull_safe
is_not_distinct_fromcomparisontimestamptz, timestamptzbooleannull_safe
eqcomparisoninterval, intervalbooleanpropagates
necomparisoninterval, intervalbooleanpropagates
ltcomparisoninterval, intervalbooleanpropagates
gtcomparisoninterval, intervalbooleanpropagates
lecomparisoninterval, intervalbooleanpropagates
gecomparisoninterval, intervalbooleanpropagates
is_distinct_fromcomparisoninterval, intervalbooleannull_safe
is_not_distinct_fromcomparisoninterval, intervalbooleannull_safe
eqcomparisonfloat, floatbooleanpropagates
necomparisonfloat, floatbooleanpropagates
ltcomparisonfloat, floatbooleanpropagates
gtcomparisonfloat, floatbooleanpropagates
lecomparisonfloat, floatbooleanpropagates
gecomparisonfloat, floatbooleanpropagates
is_distinct_fromcomparisonfloat, floatbooleannull_safe
is_not_distinct_fromcomparisonfloat, floatbooleannull_safe
is_nullnull_testanybooleandetects
is_not_nullnull_testanybooleandetects
addarithmeticinteger, integerpromotedpropagates
subarithmeticinteger, integerpromotedpropagates
mularithmeticinteger, integerpromotedpropagates
divarithmeticinteger, integerpromotedpropagates
modarithmeticinteger, integerpromotedpropagates
negarithmeticintegerpromotedpropagates
addarithmeticdecimal, decimalpromotedpropagates
subarithmeticdecimal, decimalpromotedpropagates
mularithmeticdecimal, decimalpromotedpropagates
divarithmeticdecimal, decimalpromotedpropagates
modarithmeticdecimal, decimalpromotedpropagates
negarithmeticdecimalpromotedpropagates
addarithmeticinterval, intervalintervalpropagates
subarithmeticinterval, intervalintervalpropagates
negarithmeticintervalintervalpropagates
addarithmetictimestamp, intervaltimestamppropagates
addarithmeticinterval, timestamptimestamppropagates
subarithmetictimestamp, intervaltimestamppropagates
addarithmetictimestamptz, intervaltimestamptzpropagates
addarithmeticinterval, timestamptztimestamptzpropagates
subarithmetictimestamptz, intervaltimestamptzpropagates
subarithmetictimestamp, timestampintervalpropagates
subarithmetictimestamptz, timestamptzintervalpropagates
mularithmeticinterval, integerintervalpropagates
mularithmeticinteger, intervalintervalpropagates
mularithmeticinterval, decimalintervalpropagates
mularithmeticdecimal, intervalintervalpropagates
divarithmeticinterval, integerintervalpropagates
divarithmeticinterval, decimalintervalpropagates
addarithmeticdate, integerdatepropagates
addarithmeticinteger, datedatepropagates
subarithmeticdate, integerdatepropagates
subarithmeticdate, datei32propagates
addarithmeticdate, intervaltimestamppropagates
addarithmeticinterval, datetimestamppropagates
subarithmeticdate, intervaltimestamppropagates
addarithmeticfloat, floatpromotedpropagates
subarithmeticfloat, floatpromotedpropagates
mularithmeticfloat, floatpromotedpropagates
divarithmeticfloat, floatpromotedpropagates
modarithmeticfloat, floatpromotedpropagates
negarithmeticfloatpromotedpropagates
absfunctionintegerpromotedpropagates
absfunctiondecimalpromotedpropagates
roundfunctiondecimaldecimalpropagates
roundfunctiondecimal, integerdecimalpropagates
roundfunctionintegerdecimalpropagates
roundfunctioninteger, integerdecimalpropagates
ceilfunctiondecimaldecimalpropagates
ceilfunctionintegerdecimalpropagates
ceilingfunctiondecimaldecimalpropagates
ceilingfunctionintegerdecimalpropagates
floorfunctiondecimaldecimalpropagates
floorfunctionintegerdecimalpropagates
truncfunctiondecimaldecimalpropagates
truncfunctionintegerdecimalpropagates
truncfunctiondecimal, integerdecimalpropagates
truncfunctioninteger, integerdecimalpropagates
absfunctionfloatpromotedpropagates
ceilfunctionfloatf64propagates
ceilingfunctionfloatf64propagates
floorfunctionfloatf64propagates
truncfunctionfloatf64propagates
roundfunctionfloatf64propagates
roundfunctionfloat, integerf64propagates
sqrtfunctionfloatf64propagates
expfunctionfloatf64propagates
lnfunctionfloatf64propagates
log10functionfloatf64propagates
powfunctionfloat, floatf64propagates
powerfunctionfloat, floatf64propagates
sqrtfunctiondecimaldecimalpropagates
expfunctiondecimaldecimalpropagates
lnfunctiondecimaldecimalpropagates
logfunctiondecimaldecimalpropagates
log10functiondecimaldecimalpropagates
logfunctiondecimal, decimaldecimalpropagates
powerfunctiondecimal, decimaldecimalpropagates
powfunctiondecimal, decimaldecimalpropagates
sinfunctionfloatf64propagates
cosfunctionfloatf64propagates
tanfunctionfloatf64propagates
cbrtfunctionfloatf64propagates
pifunctionf64propagates
radiansfunctionfloatf64propagates
degreesfunctionfloatf64propagates
asinfunctionfloatf64propagates
acosfunctionfloatf64propagates
atanfunctionfloatf64propagates
atan2functionfloat, floatf64propagates
cotfunctionfloatf64propagates
sinhfunctionfloatf64propagates
coshfunctionfloatf64propagates
tanhfunctionfloatf64propagates
asinhfunctionfloatf64propagates
acoshfunctionfloatf64propagates
atanhfunctionfloatf64propagates
signfunctiondecimaldecimalpropagates
signfunctionfloatf64propagates
factorialfunctionintegerdecimalpropagates
scalefunctiondecimali32propagates
min_scalefunctiondecimali32propagates
trim_scalefunctiondecimaldecimalpropagates
make_intervalfunctioninteger, integer, integer, integer, integer, integer, floatintervalpropagates
make_timestampfunctioninteger, integer, integer, integer, integer, floattimestamppropagates
make_timestamptzfunctioninteger, integer, integer, integer, integer, floattimestamptzpropagates
make_timestamptzfunctioninteger, integer, integer, integer, integer, float, texttimestamptzpropagates
uuid_extract_versionfunctionuuidi16propagates
uuid_extract_timestampfunctionuuidtimestamptzpropagates
uuidv4functionuuidpropagates
uuidv7functionuuidpropagates
uuidv7functionintervaluuidpropagates
nowfunctiontimestamptzpropagates
clock_timestampfunctiontimestamptzpropagates
nextvalfunctiontexti64propagates
currvalfunctiontexti64propagates
setvalfunctiontext, integeri64propagates
setvalfunctiontext, integer, booleani64propagates
lastvalfunctioni64propagates
current_settingfunctiontexttextpropagates
current_settingfunctiontext, booleantextpropagates
num_nullsfunctionanyi32none
num_nonnullsfunctionanyi32none
array_ndimsfunctionanyarrayi32propagates
array_lengthfunctionanyarray, integeri32propagates
array_lowerfunctionanyarray, integeri32propagates
array_upperfunctionanyarray, integeri32propagates
cardinalityfunctionanyarrayi32propagates
array_dimsfunctionanyarraytextpropagates
array_to_jsonfunctionanyarrayjsonpropagates
array_appendfunctionanyarray, anyelementanyarraynone
array_prependfunctionanyelement, anyarrayanyarraynone
array_catfunctionanyarray, anyarrayanyarraynone
array_removefunctionanyarray, anyelementanyarraynone
array_replacefunctionanyarray, anyelement, anyelementanyarraynone
array_positionfunctionanyarray, anyelementi32none
array_positionfunctionanyarray, anyelement, integeri32none
array_positionsfunctionanyarray, anyelementi32[]none
concatconcatanyarray, anyarrayanyarraynone
concatconcatanyarray, anyelementanyarraynone
concatconcatanyelement, anyarrayanyarraynone
containscontainmentanyarray, anyarraybooleanpropagates
contained_bycontainmentanyarray, anyarraybooleanpropagates
overlapscontainmentanyarray, anyarraybooleanpropagates
containscontainmentanyrange, anyrangebooleanpropagates
containscontainmentanyrange, anyelementbooleanpropagates
contained_bycontainmentanyrange, anyrangebooleanpropagates
contained_bycontainmentanyelement, anyrangebooleanpropagates
overlapscontainmentanyrange, anyrangebooleanpropagates
strictly_leftcontainmentanyrange, anyrangebooleanpropagates
strictly_rightcontainmentanyrange, anyrangebooleanpropagates
not_extend_rightcontainmentanyrange, anyrangebooleanpropagates
not_extend_leftcontainmentanyrange, anyrangebooleanpropagates
adjacentcontainmentanyrange, anyrangebooleanpropagates
lowerfunctionanyrangeanyelementpropagates
upperfunctionanyrangeanyelementpropagates
lowerfunctiontexttextpropagates
upperfunctiontexttextpropagates
lengthfunctiontexti32propagates
char_lengthfunctiontexti32propagates
character_lengthfunctiontexti32propagates
octet_lengthfunctiontexti32propagates
bit_lengthfunctiontexti32propagates
substrfunctiontext, integertextpropagates
substrfunctiontext, integer, integertextpropagates
leftfunctiontext, integertextpropagates
rightfunctiontext, integertextpropagates
lpadfunctiontext, integertextpropagates
lpadfunctiontext, integer, texttextpropagates
rpadfunctiontext, integertextpropagates
rpadfunctiontext, integer, texttextpropagates
btrimfunctiontexttextpropagates
btrimfunctiontext, texttextpropagates
ltrimfunctiontexttextpropagates
ltrimfunctiontext, texttextpropagates
rtrimfunctiontexttextpropagates
rtrimfunctiontext, texttextpropagates
replacefunctiontext, text, texttextpropagates
translatefunctiontext, text, texttextpropagates
repeatfunctiontext, integertextpropagates
reversefunctiontexttextpropagates
strposfunctiontext, texti32propagates
split_partfunctiontext, text, integertextpropagates
starts_withfunctiontext, textbooleanpropagates
asciifunctiontexti32propagates
chrfunctionintegertextpropagates
initcapfunctiontexttextpropagates
to_hexfunctionintegertextpropagates
encodefunctionbytea, texttextpropagates
decodefunctiontext, textbyteapropagates
quote_literalfunctiontexttextpropagates
quote_identfunctiontexttextpropagates
quote_nullablefunctiontexttextnone
regexp_replacefunctiontext, text, texttextpropagates
regexp_replacefunctiontext, text, text, texttextpropagates
regexp_matchfunctiontext, texttext[]propagates
regexp_matchfunctiontext, text, texttext[]propagates
regexp_likefunctiontext, textbooleanpropagates
regexp_likefunctiontext, text, textbooleanpropagates
regexp_countfunctiontext, texti32propagates
regexp_countfunctiontext, text, integeri32propagates
regexp_countfunctiontext, text, integer, texti32propagates
regexp_substrfunctiontext, texttextpropagates
regexp_substrfunctiontext, text, integertextpropagates
regexp_substrfunctiontext, text, integer, integertextpropagates
regexp_substrfunctiontext, text, integer, integer, texttextpropagates
regexp_substrfunctiontext, text, integer, integer, text, integertextpropagates
regexp_instrfunctiontext, texti32propagates
regexp_instrfunctiontext, text, integeri32propagates
regexp_instrfunctiontext, text, integer, integeri32propagates
regexp_instrfunctiontext, text, integer, integer, integeri32propagates
regexp_instrfunctiontext, text, integer, integer, integer, texti32propagates
regexp_instrfunctiontext, text, integer, integer, integer, text, integeri32propagates
isemptyfunctionanyrangebooleanpropagates
lower_incfunctionanyrangebooleanpropagates
upper_incfunctionanyrangebooleanpropagates
lower_inffunctionanyrangebooleanpropagates
upper_inffunctionanyrangebooleanpropagates
i32rangefunctioninteger, integeri32rangenone
i32rangefunctioninteger, integer, texti32rangenone
i64rangefunctioninteger, integeri64rangenone
i64rangefunctioninteger, integer, texti64rangenone
numrangefunctiondecimal, decimalnumrangenone
numrangefunctiondecimal, decimal, textnumrangenone
tsrangefunctiontimestamp, timestamptsrangenone
tsrangefunctiontimestamp, timestamp, texttsrangenone
tstzrangefunctiontimestamptz, timestamptztstzrangenone
tstzrangefunctiontimestamptz, timestamptz, texttstzrangenone
daterangefunctiondate, datedaterangenone
daterangefunctiondate, date, textdaterangenone
range_unionarithmeticanyrange, anyrangeanyrangepropagates
range_differencearithmeticanyrange, anyrangeanyrangepropagates
range_intersectarithmeticanyrange, anyrangeanyrangepropagates
range_mergefunctionanyrange, anyrangeanyrangepropagates
jsonb_typeoffunctionjsonbtextpropagates
json_typeoffunctionjsontextpropagates
jsonb_array_lengthfunctionjsonbi32propagates
json_array_lengthfunctionjsoni32propagates
jsonb_strip_nullsfunctionjsonbjsonbpropagates
json_strip_nullsfunctionjsonjsonpropagates
jsonb_prettyfunctionjsonbtextpropagates
to_jsonbfunctionanyjsonbpropagates
to_jsonfunctionanyjsonpropagates
json_scalarfunctionanyjsonpropagates
json_serializefunctionjsontextpropagates
json_serializefunctionjsonbtextpropagates
jsonb_build_arrayfunctionanyjsonbnone
json_build_arrayfunctionanyjsonnone
jsonb_build_objectfunctionanyjsonbnone
json_build_objectfunctionanyjsonnone

Aggregates

NameArgument typesResult
count_stari64
countanyi64
sumintegersum_widen
sumdecimaldecimal
avgintegerdecimal
avgdecimaldecimal
sumfloatsame_as_input
avgfloatsame_as_input
minanysame_as_input
maxanysame_as_input
jsonb_agganyjsonb
json_agganyjson
jsonb_agg_strictanyjsonb
json_agg_strictanyjson

Set-returning functions

Called in FROM position as a computed row source — they expand their arguments into a set of rows. generate_series yields an integer series; unnest (polymorphic over anyarray) yields one row per array element. The produced relation has one column named after the function (or its alias).

NameArgument typesResult columnNULL
generate_seriesinteger, integerset_of_promotedempty_on_null
generate_seriesinteger, integer, integerset_of_promotedempty_on_null
unnestanyarrayset_of_elementempty_on_null
jsonb_array_elementsjsonbjsonbempty_on_null
jsonb_array_elements_textjsonbtextempty_on_null
jsonb_object_keysjsonbtextempty_on_null
json_object_keysjsontextempty_on_null
jsonb_eachjsonbjsonbempty_on_null
jsonb_each_textjsonbtextempty_on_null
jed — an embeddable, strictly-typed SQL database.