-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Error when adding to ManyToManyField #102
Comments
The full query: |
Managed to fix it doing, although I'm not database savvy enough to know if this is safe or not
|
Thanks for yoru reporting and inspection! Upon further investigation, it appears that INSERT ON CONFLICT was introduced in Postgres 9.5; https://www.postgresql.org/docs/9.5/sql-insert.html . Redshift is based on Postgres 8.0.2 and does not support INSERT ON CONFLICT. I think your patch is a good solution because other backends that do not support ON CONFLICT simply return an empty string from Since I don't have time to fix it now, I will prepare a UnitTest to reproduce the problem, fix it, and confirm that it works in the next few weeks. If you could prepare a PR for me, that would be great ;) |
I can do that for sure! |
I would like to include this request/PR on #167. |
Subject: ProgrammingError when adding to ManyToManyField
Problem
Procedure to reproduce the problem
Same thing happens when trying to add from the admin site
Error logs / results
Expected results
New record(s) get added to the database
Environment info
The text was updated successfully, but these errors were encountered: