haskell-opaleye icon indicating copy to clipboard operation
haskell-opaleye copied to clipboard

Add support for INSERT ... ON CONFLICT UPDATE ("upsert")

Open bitc opened this issue 9 years ago • 5 comments

This is a PostgreSQL feature since PostgreSQL version 9.5. From what I can tell, it is not possible to use this from opaleye yet. It is very useful and would be nice to have :)

  • https://www.postgresql.org/docs/9.5/static/sql-insert.html#SQL-ON-CONFLICT
  • https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.5#INSERT_...ON_CONFLICT_DO_NOTHING.2FUPDATE.28.22UPSERT.22.29

bitc avatar Oct 09 '16 13:10 bitc

Oops, just saw that this is a duplicate of #139. Still a very desirable feature though! Closing

bitc avatar Oct 09 '16 13:10 bitc

I've never used this feature, but happy to receive a PR.

tomjaguarpaw avatar Oct 09 '16 18:10 tomjaguarpaw

Reopening, because ON CONFLICT UPDATE is not supported, only ON CONFLICT DO NOTHING.

tomjaguarpaw avatar Jun 06 '20 12:06 tomjaguarpaw

@tomjaguarpaw this issue still looks closed to me 😛

lambda-fairy avatar Jun 06 '20 12:06 lambda-fairy

@lambda-fairy Thanks!

tomjaguarpaw avatar Jun 06 '20 13:06 tomjaguarpaw