final class ColumnStorageChange
    implements AlterCommand
    uses Snapshot
Public API: explicitly declared with @visibility public.

ALTER [ COLUMN ] ... SET STORAGE or SET COMPRESSION.

Mirrors AT_SetStorage and AT_SetCompression. Source: https://www.postgresql.org/docs/17/sql-altertable.html.

Changing the storage of a columndoctest
$statement = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER TABLE t ALTER a SET STORAGE external');
    $statement->statement->commands[0]->setting->method->value // => 'external'

Properties§

public Name $column

Methods§

public function __construct(
    public Name $column,
    public ColumnStorage|ColumnCompression $setting,
)

Parameters

$columnNameThe column
$settingColumnStorage|ColumnCompressionThe new storage or compression
public function deriveClause(Derivation $derivation, Environment $environment): void

Checks that the column exists.

Parameters

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

Writes the action.

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
Type checks 1