Skip to content

Partitioned Table Display #46

@muhammed-oztel

Description

@muhammed-oztel

In postgre connection, Items part list the partitioned tables with each partition. This can be a tolerated if there is not too much partitions.

If there is no specific reason to list all partitions, it would be nice to list the main table for partitioned ones.

A sample response from GPT was updating that quey with this filter.

....
WHERE
            t.table_type = 'BASE TABLE'
            AND t.table_schema NOT IN ('information_schema', 'pg_catalog', 'pg_toast')
            -- Exclude child partitions
            AND t.table_name NOT IN (
                SELECT inhrelid::regclass::text
                FROM pg_inherits
            )

At first look, it's working. Better to check how similar apps managing such condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions