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

Reports the attributes a definition lacks or combines in a way its command rejects.

Rule: PG-DEFINE-CHECK-001. Attribute names are compared respecting case (an unquoted name is folded to lower case). An operator needs a function (function or procedure) and, as postfix operators no longer exist, a right argument type. An aggregate needs a state type and a state transition function; the moving-aggregate attributes come with mstype, and mstype with msfunc and minvfunc; serialization needs both functions; only an ordered-set aggregate is hypothetical; an old-style aggregate names its input type with basetype, which is redundant in the new style. A base type needs input and output functions and a modifier input function for a modifier output function. A range type needs a subtype. A collation copied from another takes no other attribute and locale excludes lc_collate and lc_ctype; otherwise its provider (libc when not given) needs lc_collate and lc_ctype or locale, or for ICU and builtin locale, and only ICU takes rules or is nondeterministic. A text search parser needs its start, gettoken, end and lextypes methods, a template its lexize method, a dictionary its template, and a configuration a parser or a configuration to copy, but not both. Attribute values and unrecognized names are PG-DEFINE-ATTRIBUTE-001. Terminates: one pass over the attributes. Source: https://www.postgresql.org/docs/17/sql-createaggregate.html, https://www.postgresql.org/docs/17/sql-createoperator.html, https://www.postgresql.org/docs/17/sql-createtype.html, https://www.postgresql.org/docs/17/sql-createcollation.html, DefineOperator, DefineAggregate, DefineType, DefineRange, DefineCollation, DefineTSParser, DefineTSTemplate, DefineTSDictionary and DefineTSConfiguration in src/backend/commands of PostgreSQL 17. Status: Implemented.

Methods§

public function present(list<Attribute> $attributes): array<string, Attribute>
public function collation(
    array<string, Attribute> $present,
    int $count,
    GrammarRelease $release,
): list<AttributeProblem>

Answers the contradictory and missing attributes of a collation; a provider the server does not know stops the checks, as it does.

Parameters

$presentarray<string, Attribute>
$countint
$releaseGrammarRelease

Returns

Test cases 1
Called from 1
Calls 6

Private surface 1§

Implementation details, listed for orientation only.

private const PARSER_METHODS = ['start', 'gettoken', 'end', 'lextypes']

Test cases 7§

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

Dedicated tests 7

Relations§

Instantiated in 2
Method calls 2