Skip to content

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.

@revoluzionario
Copy link

Hello, thanks @oscarlocatelli for this PR! I am recently doing a project involving migration from Oracle to PostgreSQL, and the upsert requirements in my project is kinda simple (just needing to use PK to do that), so I wanna ask if this PR are tested before? I want to apply this PR in my project.

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.

3 participants