Replies: 1 comment
-
Going to move this over to a discussion since that's where I've been keeping feature requests. I do think that a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While
pgbulk.upsert
works well for cases in tables that have uniquness constraints, in cases where you'd like to upsert on models without uniqueness constraints, a combination of multiple uniqueness constraints, or with deferred uniquness constraints. MERGE solves all of these use-cases, and as of Postgres 17 supports the ability to return results.I personally like how jooq for Java supports MERGE, with the ability to dynamically add match/non-match statements:
becomes:
Beta Was this translation helpful? Give feedback.
All reactions