classUpdateExtension
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.
$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> $versionspublic Name $nameMethods§
public function __construct(public Name $name, list<Word|StringConstant> $versions = [])Parameters
$name | Name | The extension name |
$versions | list<Word|StringConstant> | The versions written after TO, in order |
Calls 3
- static-call Check::listOf() line 47
- class-const Node::class() line 47
- static-call Check::input() line 48
public function deriveStatement(Derivation $derivation): voidReports more than one version.
Parameters
$derivation | Derivation |
Calls 4
- method-call OptionChecks::redundant() line 59
- new OptionChecks line 59
- function-call
array_fillline 59 - function-call
countline 59
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 67
- class-const NameUse::Column() line 67
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
UpdateExtensionTestcalls