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
Continue looking for available names when an auto-generated constraint name is unavailable #1014
Comments
I'd like to work on this issue. |
Go ahead, @A1O! |
@A1O are you still working on this? |
This issue has not been updated in 90 days and is being marked as stale. |
@kgodey I believe this is no longer an issue - possibly due to the new version of Postgres. When I run the reproduction steps, it no longer fails and finds a unique name for the constraint. See below how it picked
|
Thanks for looking into this, @purujit I can confirm that I'm no longer able to reproduce this bug. |
Summary
When the API receives a POST request at
/tables/{table_id}/constraints/
without aname
parameter, it will auto-generate a constraint name. If the name it auto-generates isn't available, it will give up, returning an error.Reproduce
Add a new empty table named
foo_bar_key
.Add a new table with imported data by pasting the following and setting the table name to
foo
.Within the
foo
table, disallow duplicates for thebar
column.Expect success.
Observe an error:
Desired behavior
Instead of giving up right away, the backend should continue looking for available names by appending suffixes such as
_1
,_2
, etc.The text was updated successfully, but these errors were encountered: