Skip to content

SQL for getting the names of partitions #34907

Description

@jseldess

We should make it easy for user to retrieve the names of partitions via SQL, similar to how you can currently get other types of objects with SHOW CREATE. Something like SHOW PARTITIONS FOR <table> would be nice. But it should show ALL partitions for the table, in my opinion, both of the primary and all secondary indexes.

Also, after you define partitions on a table and its secondary indexes, SHOW CREATE TABLE only gives you the syntax for creating the partition on the primary index. I wonder if that could be expanded to include partitions on secondary indexes, too.

Why it's important to be able to easily retrieve partition names? After partitioning table data (primary and secondary indexes), you have to create zone configs for each partition. To do that, you need the names of the partitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-partitioningC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions