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

A request to update an extension: ALTER EXTENSION name UPDATE [ TO version ].

Rule: PG-EXTENSION-002. Mirrors AlterExtensionStmt, whose option list holds the TO versions in order; no version updates to the default version, and more than one is a diagnostic. Source: https://www.postgresql.org/docs/17/sql-alterextension.html. Status: Implemented.

Updating to a versiondoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("ALTER EXTENSION hstore UPDATE TO '2.0'");
    $operation->statement->versions[0]->value // => '2.0'

Properties§

public list<Word|StringConstant> $versions
public Name $name

Methods§

public function __construct(public Name $name, list<Word|StringConstant> $versions = [])

Parameters

$nameNameThe extension name
$versionslist<Word|StringConstant>The versions written after TO, in order
Calls 3
public function deriveStatement(Derivation $derivation): void

Reports more than one version.

Parameters

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

Writes the request.

Parameters

$outOutput
Calls 2

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 1