pub enum BinOp {
Show 29 variants
Or,
And,
Eq,
NotEq,
IsDistinctFrom,
IsNotDistinctFrom,
Lt,
LtEq,
Gt,
GtEq,
Add,
Sub,
Mul,
Div,
L2Distance,
InnerProduct,
CosineDistance,
Concat,
JsonGet,
JsonGetText,
JsonGetPath,
JsonGetPathText,
JsonContains,
TsMatch,
InetContainedBy,
InetContainedByEq,
InetContains,
InetContainsEq,
InetOverlap,
}Variants§
Or
And
Eq
NotEq
IsDistinctFrom
v7.9.27b — PG a IS DISTINCT FROM b / a IS NOT DISTINCT FROM b. NULL-safe equality: NULL IS NOT DISTINCT FROM
NULL → true, NULL IS DISTINCT FROM NULL → false. The
non-NULL behaviour matches <> / = exactly. Common in
PG-style JOIN ON predicates and pg_dump output.
IsNotDistinctFrom
Lt
LtEq
Gt
GtEq
Add
Sub
Mul
Div
L2Distance
pgvector L2 (Euclidean) distance <->. Defined for two vector
operands of equal dimension; engine returns Value::Float(d).
InnerProduct
pgvector inner-product <#> — returns -Σ aᵢ bᵢ so “smaller =
more similar” remains true (matches pgvector’s published convention).
CosineDistance
pgvector cosine distance <=> — 1 - (a·b)/(|a| |b|).
Concat
SQL string concatenation ||. NULL propagates.
JsonGet
v4.14 json -> key — element access by string key (object)
or integer index (array). Returns a JSON value.
JsonGetText
v4.14 json ->> key — same access, returns the result as
TEXT (unwraps a top-level JSON string; renders other scalars
as their canonical text).
JsonGetPath
v6.4.5 json #> path_text — walk the path encoded as a PG
text array literal like '{a,0,b}'. Returns JSON.
JsonGetPathText
v6.4.5 json #>> path_text — same walk, returns TEXT.
JsonContains
v6.4.5 json @> sub_json — containment. Returns BOOL; true
when every key/value in sub_json is structurally present in
the left side. Matches PG semantics (top-level + recursive).
TsMatch
v7.12.2 tsvector @@ tsquery — FTS match. Returns BOOL;
3VL on NULL. Symmetric: PG also accepts tsquery @@ tsvector and engine eval normalises either ordering.
InetContainedBy
v7.17.0 Phase 3.P0-47 — PG INET / CIDR strict contained-in
<<. LHS network is strictly inside RHS network (no equality).
InetContainedByEq
v7.17.0 Phase 3.P0-47 — PG INET / CIDR contained-in-or-equal
<<=. LHS network ⊆ RHS network.
InetContains
v7.17.0 Phase 3.P0-47 — PG INET / CIDR strict contains >>.
LHS network strictly contains RHS network.
InetContainsEq
v7.17.0 Phase 3.P0-47 — PG INET / CIDR contains-or-equal >>=.
LHS network ⊇ RHS network.
InetOverlap
v7.17.0 Phase 3.P0-47 — PG INET / CIDR network overlap &&.
True iff either network contains any address of the other.