Skip to content

Instantly share code, notes, and snippets.

@savfischer
Created March 17, 2019 17:20
Show Gist options
  • Save savfischer/bdaf7c285ad91dfe62759539ac7932a3 to your computer and use it in GitHub Desktop.
Save savfischer/bdaf7c285ad91dfe62759539ac7932a3 to your computer and use it in GitHub Desktop.
Command template for getting postgres table data (pg_dump)

The below command is an example of creating a sql file of the us_states table in my local development postgres database for Rudolph. This is helpful for giving data to other developers, for instance this is how postcodes for the US, Germany, and the Netherlands have been shared with Hardin D&D developers to put into visual manager.

pg_dump -h localhost -p 5432 -U postgres -d cre_cmbs_development -t us_states > us_states.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment