Posts

Showing posts from July, 2020

Return Upserted Data

Image
There was an interesting issue recently opened. The user made several interesting decisions that to my view can be useful for all ( click to see ): Spatial types . Not only Postgres has a rich GIS/Spatial support, the driver offers dedicated types, to make the experience as smooth as possible. Batch insert with ON_CONFLICT clause - making the insertion pipeline very efficient. RETURNING clause. Since the ON_CONFLICT clause's action is DO_NOTHING , the clause will return all the INSERTed rows. I believe that it filters out a substantial part of objects, so it effectively reduces the amount of work that needs to be performed with the output (instead of the entire set).