Skip to content

Instantly share code, notes, and snippets.

@ittus
Last active April 8, 2019 02:29
Show Gist options
  • Save ittus/e59fa43a33f7e373fea994ac1497ba72 to your computer and use it in GitHub Desktop.
Save ittus/e59fa43a33f7e373fea994ac1497ba72 to your computer and use it in GitHub Desktop.
[Postgresql] Copy data to csv file without admin permission
psql -h <hostname> -U <username> -d <dbname> -c "COPY <tablename> TO stdout DELIMITER ',' CSV HEADER;" > data.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment