[DBIx-Class-Devel] [dbsrgits/sql-translator] Fix bug loading Postgres index fields (PR #153)

M Conrad notifications at github.com
Wed Dec 21 12:21:34 GMT 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.
You can view, comment on, or merge this pull request online at:

  https://github.com/dbsrgits/sql-translator/pull/153

-- Commit Summary --

  * Fix bug loading Postgres index fields

-- File Changes --

    M lib/SQL/Translator/Parser/DBI/PostgreSQL.pm (5)

-- Patch Links --

https://github.com/dbsrgits/sql-translator/pull/153.patch
https://github.com/dbsrgits/sql-translator/pull/153.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/pull/153
You are receiving this because you are subscribed to this thread.

Message ID: <dbsrgits/sql-translator/pull/153 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20221221/1e73062c/attachment.html>


More information about the DBIx-Class-Devel mailing list