final class DefineRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers DefineStmt: CREATE AGGREGATE, OPERATOR, TYPE, TEXT SEARCH objects and COLLATION.

Rule: PG-DEFINE-LOWER-001. Scope: DefineStmt, old_aggr_definition, old_aggr_list, old_aggr_elem. Constructors: Define, CopyCollation, and the catalog family's CreateComposite, CreateEnum and CreateRange for CREATE TYPE ... AS ( ... ), AS ENUM and AS RANGE, which PostgreSQL represents with their own nodes. Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createaggregate.html, https://www.postgresql.org/docs/17/sql-createoperator.html, https://www.postgresql.org/docs/17/sql-createtype.html, https://www.postgresql.org/docs/17/sql-createcollation.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function type(Node $statement): Statement
public function old(Node $definition): list<Attribute>

Lowers old_aggr_definition: every attribute has a value and is named by an identifier.

Parameters

$definitionNode

Returns

list<Attribute>

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 4

Private surface 2§

Implementation details, listed for orientation only.

private const SEARCH = ['DefineStmt: CREATE TEXT_P SEARCH PARSER any_name definition' => \SqlSemantics…
private Lowering $lowering

Test cases 5§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 5

Relations§

Instantiated in 1
Method calls 1