Enhancement: Sort indexes alphabetically in dump
Right now indexes hit the dump in apparently arbitrary order. A stable order like alphabetical would make it easier to see the changes, and to catch unexpected changes (e.g. loss of operator classes).
Not able to reproduce.
Index should be sorted https://github.com/pgschema/pgschema/blob/fd7ba5c04f4bae37785c3d9cca8fe3660a177342/internal/diff/index.go#L19-L23
Test case https://github.com/pgschema/pgschema/blob/main/testdata/dump/issue_133_index_sort/
Thanks I’ll get the latest from main and try again
Marcin Tustin Tel: +1 917 553 3974
On Fri, Oct 31, 2025 at 06:34 Tianzhou @.***> wrote:
tianzhou left a comment (pgschema/pgschema#133) https://github.com/pgschema/pgschema/issues/133#issuecomment-3472409571
Not able to reproduce.
Index should be sorted
https://github.com/pgschema/pgschema/blob/fd7ba5c04f4bae37785c3d9cca8fe3660a177342/internal/diff/index.go#L19-L23
Test case https://github.com/pgschema/pgschema/blob/main/testdata/dump/issue_133_index_sort/
— Reply to this email directly, view it on GitHub https://github.com/pgschema/pgschema/issues/133#issuecomment-3472409571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJOUOF6XYU7BBYCACVGSYT32M3LDAVCNFSM6AAAAACKWKBLNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTINZSGQYDSNJXGE . You are receiving this because you authored the thread.Message ID: @.***>
Can confirm this is working in recent versions