Search Postgresql Archives

Re: Bulk Insert/Update Scenario

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mana, 

A starting point would be reading about the batch upsert functionality:
https://www.postgresql.org/docs/current/static/sql-insert.html

You would do something like:
INSERT INTO table ON CONFLICT update... 

This operation would be atomic. You can also look into deferrable constraints such that you would perform all your insert / update operations in a transaction block and accommodate for the constraints. 

I hope this helps to get you on the right track!

Thanks,
Jordan Deitch
http://id.rsa.pub



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux