You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Postgres 17 now supports MERGE INTO with RETURNING (which is very handy to streamline queries and upsert records without writing multiple queries).
MERGE INTO heroes AS h
USING (VALUES ('Wade', 'Wilson', 'Deadpool')) AS v(first_name, last_name, hero_name)
ONh.hero_name=v.hero_name
WHEN MATCHED THEN
UPDATESET first_name =v.first_name, last_name =v.last_name
WHEN NOT MATCHED THEN
INSERT (first_name, last_name, hero_name)
VALUES (v.first_name, v.last_name, v.hero_name)
RETURNING merge_action(), *;
Is it possible to create the preceding query (taken from the Neon release note) with Kysely?
The text was updated successfully, but these errors were encountered:
asterikx
changed the title
Postgres 17 mergeInto with returningAll
Postgres 17 mergeInto with returningOct 5, 2024
Postgres 17 now supports
MERGE INTO
withRETURNING
(which is very handy to streamline queries and upsert records without writing multiple queries).Is it possible to create the preceding query (taken from the Neon release note) with Kysely?
The text was updated successfully, but these errors were encountered: