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

The rules of the option lists of EXPLAIN, VACUUM, ANALYZE, CLUSTER and REINDEX.

Rule: PG-UTILITY-OPTION-001. Writing: a parenthesized list holds at least one option; the older word syntax holds only the words the command reads there, each once, without a value, in the order of the grammar, and the word ANALYZE is the keyword. Checking: each command knows the option names its manual page lists for the release (EXPLAIN gains SERIALIZE and MEMORY in 17); the server compares the names exactly, after the lexer folded unquoted words to lower case, and rejects any other name. A known option whose value the server reads as a Boolean must have a Boolean value by PG-UTILITY-OPTION-VALUE-001, and one it reads as text must have a value; the options whose values follow rules of their own (FORMAT and SERIALIZE of EXPLAIN, PARALLEL and INDEX_CLEANUP of VACUUM) are checked by the command. Termination: one pass over a finite list. Source: https://www.postgresql.org/docs/17/sql-explain.html, https://www.postgresql.org/docs/16/sql-explain.html, https://www.postgresql.org/docs/17/sql-vacuum.html, https://www.postgresql.org/docs/17/sql-analyze.html, https://www.postgresql.org/docs/17/sql-cluster.html, https://www.postgresql.org/docs/17/sql-reindex.html. Status: Implemented.

Methods§

public function derive(
    Derivation $derivation,
    string $command,
    list<UtilityOption> $options,
): void

Derives the option values and reports each option the command does not know and each value it cannot read.

Parameters

$derivationDerivation
$commandstring
$optionslist<UtilityOption>
Called from 5
Calls 12

Private surface 4§

Implementation details, listed for orientation only.

private const KNOWN = ['EXPLAIN' => ['analyze', 'verbose', 'costs', 'settings', 'generic_plan', 'buff…
private const BOOLEAN = ['EXPLAIN' => ['analyze', 'verbose', 'costs', 'settings', 'generic_plan', 'buff…
private const TEXT = ['EXPLAIN' => ['format'], 'VACUUM' => ['buffer_usage_limit'], 'ANALYZE' => ['bu…
private const ADDED = ['EXPLAIN' => ['serialize', 'memory']]

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