final class ComparisonTyping
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Types the six comparison operators over catalog types.

Rule: PG-OPERATOR-COMPARISON-001 (slice — the expression family completes or replaces this with its operator table). Scope: =, <>, <, >, <=, >=, unqualified or qualified with pg_catalog. Operators are looked up by name and argument types, and a context declares no routines, so a result is known only when pg_catalog holds an operator for exactly the operand types and no schema searched before pg_catalog can supply another one: the result is then boolean. A string constant or NULL operand takes the type of the other operand; two such operands compare as text. Every other combination depends on the operator's declaration. An invalid operand makes the comparison invalid; a dependent operand makes it depend on the same inputs. Minimum precision: Known(boolean) for the exact catalog pairs listed here. Source: https://www.postgresql.org/docs/17/typeconv-oper.html, https://www.postgresql.org/docs/17/functions-comparison.html. Termination: constant work. Status: Specified.

Constants§

public const OPERATORS = ['=', '<>', '<', '>', '<=', '>=']

The comparison operator names.

Methods§

public function catalog(AnalysisContext $context, OperatorName $operator): bool

Tells whether the operator name is a comparison looked up in pg_catalog before any other schema.

Parameters

Returns

bool
Test cases 1
Called from 1
Calls 3

Private surface 2§

Implementation details, listed for orientation only.

private const SAME = ['bool', 'bytea', 'char', 'name', 'int2', 'int4', 'int8', 'text', 'oid', 'tid',…
private const CROSS = [['int2', 'int4', 'int8'], ['float4', 'float8'], ['date', 'timestamp', 'timesta…

Test cases 6§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 6

Relations§

Instantiated in 1
Method calls 1