final class Coercions
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

The implicit casts between pg_catalog types that function resolution may apply.

Rule: PG-IMPLICIT-CAST-001. The table lists the casts of pg_cast marked implicit among the numeric, string, date/time and bit-string types; a value of type unknown (a string constant or NULL) can be converted to any type. Types are compared without modifiers: a modifier never selects a function. Source: https://www.postgresql.org/docs/17/typeconv-func.html, https://www.postgresql.org/docs/17/sql-createcast.html. Termination: constant work. Status: Implemented.

Methods§

public function key(TypeFact $fact): ?string

Answers the type name an argument contributes to function lookup: unknown for a string constant or NULL, null when the type is not a catalog type of the table.

Parameters

Returns

?string
Test cases 1
Called from 1
Calls 2
public function implicit(string $from, string $to): bool

Tells whether a value of one type can be passed where another is expected without an explicit cast.

Parameters

$fromstring
$tostring

Returns

bool
Test cases 1
Called from 1
Calls 3

Private surface 1§

Implementation details, listed for orientation only.

private const IMPLICIT = ['int2' => ['int4', 'int8', 'numeric', 'float4', 'float8', 'oid'], 'int4' => ['…

Test cases 4§

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

Dedicated tests 4

Relations§

Instantiated in 4
Method calls 4