Skip to content

Order columns by attnum to ensure proper ordering in reflected table#60

Merged
jklukas merged 1 commit into
masterfrom
reflection-fix
Nov 2, 2015
Merged

Order columns by attnum to ensure proper ordering in reflected table#60
jklukas merged 1 commit into
masterfrom
reflection-fix

Conversation

@jklukas
Copy link
Copy Markdown
Member

@jklukas jklukas commented Oct 23, 2015

IDENTITY columns were being put at the end of reflected CREATE TABLE statements, regardless of their actual order in the original table definition.

@jklukas jklukas force-pushed the reflection-fix branch 2 times, most recently from d461db2 to 931d062 Compare October 24, 2015 00:58
@jklukas jklukas changed the title BUG: Sort by attnum to ensure reflected column ordering Order columns by attnum to ensure proper ordering in reflected table Oct 31, 2015
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was only passing before because the IDENTITY column already happened to be the last one. This test now fails under the old code and passes under the new code (where we add attnum to the ORDER BY clause).

@graingert
Copy link
Copy Markdown
Member

nice, merge this when you're ready

jklukas added a commit that referenced this pull request Nov 2, 2015
Order columns by attnum to ensure proper ordering in reflected table
@jklukas jklukas merged commit 64107a5 into master Nov 2, 2015
@jklukas jklukas deleted the reflection-fix branch May 4, 2017 18:52
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.

2 participants