Open mikebaldry opened 3 years ago
(Reminds me, perhaps it' relevant to learn which PostgreSQL version this happens on?) https://www.postgresql.org/message-id/20190725015448.e5a3rwa22kpnzfe3%40alap3.anarazel.de - I casually browsed this email list, which mentions work on something which had some clues about the xmax
property.
If you want to dive in to the "support composite keys" scenarios, be my guest. PRs welcome.
Code:
SQL generated:
Error from PG:
Removing the
(xmax = 0) AS _upsert_created_record
solves the issue.Reasons why my setup is weird:
(id, tenant_id)
tenant_id
Version: 0.9.5 Rails: 5.2.4.4 Ruby 2.7.1p83 Postgres: 12.2