Skip to content

Commit

Permalink
Merge pull request #78 from misdoro/master
Browse files Browse the repository at this point in the history
Avoid integer overflow on transaction ids that do not fit in int32
  • Loading branch information
olleolleolle authored Sep 5, 2018
2 parents 4bd59bb + 1728318 commit c6278c8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def upsert(arel, name = nil, binds = [])
end

def exec_upsert(sql, name, binds)
exec_query("#{sql} RETURNING *, (xmax::text::int = 0) AS _upsert_created_record", name, binds)
exec_query("#{sql} RETURNING *, (xmax = 0) AS _upsert_created_record", name, binds)
end
end
end
Expand Down

0 comments on commit c6278c8

Please sign in to comment.