Skip to content

Replaced the ON CONFLICT DO NOTHING logic with ON CONFLICT DO UPDATE to implement UPSERT #1906

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oscarlocatelli
Copy link

Dynamically use of primary keys for conflict.
Only in prepared statement code branch.

…to implement UPSERT

Dynamically use of primary keys for conflict.
Only in prepared statement code branch.
@darold
Copy link
Owner

darold commented Jun 15, 2025

Hi @oscarlocatelli, that's a good start. I think that when there's no PK we should search for a unique index and use it. If no PK or unique index are found then DO NOTHING must be used.

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