{"repo":"tomyl/pg-dump-upsert","free":true,"listed":false,"github":"https://github.com/tomyl/pg-dump-upsert","clone":"git clone https://github.com/tomyl/pg-dump-upsert.git","description":"Simple tool to dump a Postgresql table as INSERT statements with ON CONFLICT clause","language":"Go","stars":17,"topics":["postgresql","pg-dump","go"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg-dump-upsert :elephant::poop: Simple tool to dump a Postgresql table as INSERT statements with ON CONFLICT clause (also known as \"upsert\" statements). Pre-alpha software . Expect crashes, data loss, silent data corruption etc. Rationale The pg\\ dump command can dump tables as INSERT statements however you can't directly restore such dumps if the database has conflicting rows. Furthermore pg dump is doing more work than simply querying the data and this sometimes causes seemingly unrelated failures. Installation Examples Dump all rows in table employee : Choose which columns to dump: Ignore conflicts: Update columns on conflict: Fetch a subset of the rows: Use a different table name in the INSERT statements: To restore a dump, simply use the \\i command in psql . TODO - [ ] Implement support for all Postgres data types. - [ ] Skip generated columns when dumping views. - [ ] Allow which columns to update when specifying -conflict-column ? - [ ] More unit tests would be nice... - [ ] Finish this TODO list.","default_branch":null,"files":null,"tree":[],"storefront":"/r/tomyl","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tomyl/pg-dump-upsert/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}