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

ALTER ... ALL IN TABLESPACE ... SET TABLESPACE: moves every table, index or materialized view of a tablespace.

Mirrors PostgreSQL's AlterTableMoveAllStmt (orig_tablespacename, objtype, roles, new_tablespacename, nowait). Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Moving the tables of some ownersdoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE ALL IN TABLESPACE a OWNED BY u1, u2 SET TABLESPACE b NOWAIT');
    $statement->toString() // => 'ALTER TABLE ALL IN TABLESPACE a OWNED BY u1, u2 SET TABLESPACE b NOWAIT'

Properties§

public list<RoleSpec> $owners
public AlterTarget $target
public Name $from
public Name $to
public bool $nowait = false

Methods§

public function __construct(
    public AlterTarget $target,
    public Name $from,
    public Name $to,
    list<RoleSpec> $owners = [],
    public bool $nowait = false,
)

Parameters

$targetAlterTargetThe kind of relation: tables, indexes or materialized views
$fromNameThe tablespace the relations are in
$toNameThe tablespace they move to
$ownerslist<RoleSpec>The owners whose relations move; none means all
$nowaitboolWhether NOWAIT is written
Calls 7
public function deriveStatement(Derivation $derivation): void

Derives nothing: the statement names catalog objects only.

Parameters

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

Writes the statement.

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