Skip to content

btree_index_atts CTE should assign attnum's starting at 1 #2

@fmcgeough

Description

@fmcgeough

I think : regexp_split_to_table(indkey::text, ' ')::smallint AS attnum,

should be : generate_series(1, array_length(indkey,1))::smallint AS attnum,

the join with pg_attributes include attnum but pg_attributes will number the attributes for the index at 1. the pg_index indkey is the physical index to the column within the table.

thanks for this query. its very helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions