Skip to content

Add support for index constraint added when altering a table (Postgres)#38

Merged
TylerBrinks merged 1 commit into
TylerBrinks:mainfrom
sualitu:feat/support-postgres-alter-table-index-constraint
Sep 16, 2024
Merged

Add support for index constraint added when altering a table (Postgres)#38
TylerBrinks merged 1 commit into
TylerBrinks:mainfrom
sualitu:feat/support-postgres-alter-table-index-constraint

Conversation

@sualitu

@sualitu sualitu commented Sep 13, 2024

Copy link
Copy Markdown
Contributor

Hey! I was playing a bit around with using this library as part of some automated testing of our PostgreSQL queries.

I hit a case that wasn't covered, as it is probably quite an edge case. Specifically, the table_constraint_using_index case from: https://www.postgresql.org/docs/current/sql-altertable.html for example:

ALTER TABLE table_name ADD CONSTRAINT constraint_name UNIQUE USING INDEX index_name

I must admit that I haven't checked if this is present on ANSI, so I've considered it Postgres specific.

It's also specific to ALTER TABLE statements, which also makes the code a bit iffy.

I am not sure when I can come back to this, so feel free to make any changes to the branch you see fit i I'm not back in a timely manner. Given that this might be a bit of an edge case for the library, I also completely respect if you don't think this change is fit for purpose.

@sualitu sualitu changed the title Add support for index constraint added when altering a table Add support for index constraint added when altering a table (Postgres) Sep 13, 2024
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