partition
List partitioning
Assign discrete key values to named partitions. Useful for stable categories; each listed value belongs to only one partition.
Formal Syntax & Structure
sql syntaxsql
PARTITION BY LIST (key)Working Example
Example Snippetsql
-- Run independently in a fresh disposable PostgreSQL database/schema.CREATE TABLE tickets(region text) PARTITION BY LIST(region);CREATE TABLE tickets_eu PARTITION OF tickets FOR VALUES IN ('EU');