Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Replace data in a single PG table.
### Source
# shell:
pg_dump -U username --data-only --table=tablename dbname > tablename.sql
### Target
# psql:
delete from tablename *;
# shell:
psql -U username dbname < tablename.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.