Re: [sqlalchemy] How to issue an INSERT ON CONFLICT instead of INSERT when using Session.add(my_object)

2017-11-17 Thread Mike Bayer
On Fri, Nov 17, 2017 at 9:17 AM, Petar wrote: > I want to override my `Session` such that it performs and `INSERT ON > CONFLICT` whenever I `add` an object. > > `merge` is too slow for my use-case: it has to perform a `SELECT` first, and > I want to reduce my latency as

[sqlalchemy] How to issue an INSERT ON CONFLICT instead of INSERT when using Session.add(my_object)

2017-11-17 Thread Petar
I want to override my `Session` such that it performs and `INSERT ON CONFLICT` whenever I `add` an object. `merge` is too slow for my use-case: it has to perform a `SELECT` first, and I want to reduce my latency as much as I can. Currently this is the standard behaviour: user =