Closed rinn7e closed 5 months ago
I just realized that upsert
is from persistent
so maybe it's more fit to write an issue in persistent repo instead.
Anyway, a workaround is to insert or update explicitly:
-- if no existing record
insert_ (GroupMarks (PgList firstKey) containList newMark)
-- if there is an existing record
update \gm -> do
set gm [ GroupMarksMark =. val newMark ]
where_ $ cond gm
Hi everyone, I have a simple problem, hope someone could help.
I have this table:
type:
Since I want to use postgres array (not json array), I have this new type PgList:
When I try to
upsert
a row, I got this error:Error:
If I use
SqlOther "integer[]"
forprofile_ids
, everything works fine. But technically, it should bebigint
forInt64
.I guess, if there is an explicit way to tell
upsert
to use bigint instead of integer, it should work. Anyone has any idea on how to do this.