final class AlterSystemSetting
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

ALTER SYSTEM SET ... or ALTER SYSTEM RESET ...: a request to change the server configuration file.

Rule: PG-ALTER-SYSTEM-001. Mirrors PostgreSQL's AlterSystemStmt, which holds a SET or RESET: a parameter set to values or to DEFAULT, or a parameter or ALL reset. The setting is derived as the request it is. Source: https://www.postgresql.org/docs/17/sql-altersystem.html. Status: Implemented.

Reading the setting of ALTER SYSTEMdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER SYSTEM SET wal_level = replica');
    [$operation->statement->setting->parameter->text(), $operation->toString()] // => ['wal_level', 'ALTER SYSTEM SET wal_level TO replica']
Refusing a transaction-local settingdoctest
new \SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\AlterSystemSetting(new \SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\SetParameterFrom(
        new \SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\ParameterName([new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('a')]),
        \SqlSemantics\Platform\PostgreSql\Statement\Utility\Session\ParameterSource::Default,
        true,
    )) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstruction

Properties§

Methods§

public function __construct(public SetParameter|SetParameterFrom|Reset $setting)

Parameters

$settingSetParameter|SetParameterFrom|ResetThe SET or RESET applied to the configuration file
Calls 3
public function deriveStatement(Derivation $derivation): void

Derives the SET or RESET.

Parameters

$derivationDerivation
Calls 1
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 1

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 2