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

A request to move a database to another default tablespace: ALTER DATABASE name SET TABLESPACE tablespace.

Rule: PG-ALTERDB-002. Mirrors AlterDatabaseStmt with the single option tablespace. Source: https://www.postgresql.org/docs/17/sql-alterdatabase.html. Status: Implemented.

Reading the new tablespacedoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER DATABASE d SET TABLESPACE fast');
    $operation->statement->tablespace->value // => 'fast'

Properties§

public Name $name
public Name $tablespace

Methods§

public function __construct(public Name $name, public Name $tablespace)

Parameters

$nameNameThe database name
$tablespaceNameThe new default tablespace
public function deriveStatement(Derivation $derivation): void

Derives nothing: the command names a database and a tablespace, which are not part of a declaration context.

Parameters

$derivationDerivation
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