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

Reports the attributes of a definition that their command does not recognize or cannot read.

Rule: PG-DEFINE-ATTRIBUTE-001. An attribute the command does not recognize draws the command's message: a warning for an operator, an aggregate and a base type, an error for a range type, a collation and a text search parser, template or configuration; a text search dictionary passes every other attribute to its template. A recognized attribute whose value its defGet* function rejects draws that function's message. A read value is further checked where the command checks it without a catalog: SETOF in an operator argument type, a type category outside printable ASCII, and the builtin collation provider before PostgreSQL 17. A base type, a range type and a collation take each attribute once (analyze and analyse are one attribute). Terminates: one pass over the attributes. Source: src/backend/commands/define.c, DefineOperator in src/backend/commands/operatorcmds.c, DefineAggregate in src/backend/commands/aggregatecmds.c, DefineType and DefineRange in src/backend/commands/typecmds.c, DefineCollation in src/backend/commands/collationcmds.c and src/backend/commands/tsearchcmds.c of PostgreSQL 16 and 17. Status: Implemented.

Methods§

public function derive(
    Derivation $derivation,
    class-string<KnownAttribute> $command,
    list<Attribute> $attributes,
    bool $once,
): void
public function unrecognized(
    class-string<KnownAttribute> $command,
    Attribute $attribute,
): ?AttributeProblem

Answers the problem the command reports for an attribute it does not recognize, or null when it passes the attribute on.

Parameters

$commandclass-string<KnownAttribute>
$attributeAttribute
Test cases 1
Called from 1
Calls 2
public function rejected(
    Reading $reading,
    string $name,
    TypeName|KeywordWord|OperatorName|SignedNumber|StringConstant|null $value,
): ?AttributeProblem

Answers the problem the command reports for a value it cannot read, or null for a value it does not read.

Parameters

Test cases 1
Called from 2
Calls 25
public function printable(string $category): bool

Tells whether the first character of a type category is printable ASCII, as the server requires.

Parameters

$categorystring

Returns

bool
Test cases 1
Called from 1
Calls 1

Private surface 1§

Implementation details, listed for orientation only.

private const UNRECOGNIZED = [\SqlSemantics\Platform\PostgreSql\Statement\Object\Attribute\Known\OperatorAtt…

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 3
Method calls 3