Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug loading Postgres index fields #153

Merged
merged 1 commit into from
Dec 21, 2022
Merged

Conversation

nrdvana
Copy link
Contributor

@nrdvana nrdvana commented Dec 21, 2022

When parsing indices of a table, the Parser::DBI::PostgreSQL makes an incorrect assumption that the numeric field references refer to the current column order. This breaks if the table has had any columns deleted, because Postgres does not re-number the columns, so the column (attribute ids) might be (1,2,4,6,7) and these are the numbers that need used.

The code already retrieved the ids of the columns, so just store them in a hash and use them instead of the column name list.

When parsing indices of a table, the Parser::DBI::PostgreSQL
makes an incorrect assumption that the numeric field references
refer to the current column order.  This breaks if the table has
had any columns deleted, because Postgres does not re-number the
columns, so the column (attribute ids) might be (1,2,4,6,7) and
these are the numbers that need used.

The code already retrieved the ids of the columns, so just store
them in a hash and use them instead of the column name list.
@rabbiveesh rabbiveesh merged commit a30ff18 into dbsrgits:master Dec 21, 2022
@rabbiveesh
Copy link
Contributor

Thanks! Let me review the other pending release stuff and then I'll cut a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants