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

Types the result of a call from its name and the facts of its arguments.

Rule: PG-CALL-RESULT-001. A context declares no routine, so a call has a known result only when it certainly resolves to a function of pg_catalog (PG-ROUTINE-MATCH-001 over PG-CALL-SIGNATURES-001): its name is qualified with pg_catalog, or unqualified while pg_catalog is the first schema searched for functions (pg_temp is never searched for them). Arguments passed by name or with VARIADIC are matched by the routine's declaration and are left to it. An invalid argument makes the call invalid; dependent arguments make it depend on the same inputs. A resolved call has the row's result type and NULL rule; a clause its kind does not accept is a diagnostic and leaves the call without a type (PG-CALL-CHECKS-001). Any other call depends on the undeclared routine; a name with a catalog qualifier also depends on the name of the current database; a name of more than three parts is improper. Source: https://www.postgresql.org/docs/17/typeconv-func.html, https://www.postgresql.org/docs/17/ddl-schemas.html#DDL-SCHEMAS-PATH. Termination: constant work per argument. Status: Implemented.

Methods§

public function catalog(
    AnalysisContext $context,
    string $name,
    list<ScalarFact> $arguments,
    bool $catalogOnly = true,
): ScalarFact

Answers the facts of a call of a pg_catalog function by a fixed name, as the SQL-syntax forms make.

Parameters

$contextAnalysisContext
$namestring
$argumentslist<ScalarFact>The facts of the arguments in order
$catalogOnlyboolWhether only `pg_catalog` is searched, as for the SQL-syntax forms; otherwise the name is unqualified

Returns

Test cases 2
Called from 11
Calls 10
public function row(
    string $name,
    list<ScalarFact> $arguments,
    bool $catalogOnly,
): array{string, string, string, list<string>}|null
public function result(
    array{string, string, string, list<string>} $row,
    list<ScalarFact> $arguments,
): ScalarFact
public function strict(list<ScalarFact> $arguments): Nullability

Answers the NULL fact of a strict function: NULL exactly when an argument is.

Parameters

$argumentslist<ScalarFact>
Test cases 1
Called from 1
Calls 2

Test cases 12§

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

Dedicated tests 12

Relations§

Instantiated in 12
Method calls 12