Tables

Table declarations including columns, constraints, indexes, RLS, triggers, and partitioning.
PageDescription
OverviewTable syntax model, inline vs. table-level constraints, modifiers
ColumnsColumn definitions: identity, generated, compression, storage
ConstraintsNamed constraints, NOT VALID, VALIDATE, foreign keys
IndexesAll index methods, partial, expression, covering, CONCURRENTLY
Row Level SecurityENABLE/FORCE RLS, policy declarations
TriggersRow, statement, constraint, and transition triggers
PartitioningRANGE, LIST, HASH, sub-partitions

Overview

The table syntax model: Part 1 column list, Part 2 block, inline vs. table-level constraints, and table modifiers.

Columns

Column definitions: identity, generated, compression, storage, statistics, and the COLUMN reference block.

Constraints

Inline and table-level constraints, NOT VALID deferred validation, and foreign keys.

Indexes

All index methods, partial indexes, expression indexes, covering indexes, and CONCURRENTLY behaviour.

Row Level Security

ENABLE/FORCE RLS and policy declarations with FOR clause, USING, and WITH CHECK.

Triggers

Row, statement, CONSTRAINT, and transition-table triggers declared in the TRIGGERS block.

Partitioning

RANGE, LIST, and HASH partitioned tables with sub-partitions and partition management.