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

SHOW parameter, SHOW ALL or a keyword form: the current value of a configuration parameter.

Rule: PG-SHOW-001. Mirrors PostgreSQL's VariableShowStmt. Facts: SHOW ALL returns the text columns name, setting and description, of which a setting or description may be absent; a keyword form returns one text column named after the parameter it stands for (TimeZone, transaction_isolation, session_authorization). A named parameter returns one text column named as the server registered the parameter, which may differ in letter case from the name written and is unknown for the parameter of an extension, so the row depends on the server's parameter registry. Termination: no recursion. Source: https://www.postgresql.org/docs/17/sql-show.html. Status: Implemented.

Reading the columns of SHOW ALLdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SHOW ALL');
    [$operation->field(0)->name->value, $operation->field(1)->name->value, $operation->field(2)->name->value] // => ['name', 'setting', 'description']
Reading the open row of a named parameterdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SHOW work_mem');
    [$operation->shape()->complete(), $operation->shape()->missing[0]->describe()] // => [false, 'the session state: the registered name of the configuration parameter work_mem']

Properties§

Methods§

public function __construct(public ParameterName|SpecialParameter $parameter)

Parameters

$parameterParameterName|SpecialParameterThe parameter, or the keywords that name one or all
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 3

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