Skip to content

Instantly share code, notes, and snippets.

@ant1fact
Created August 24, 2022 21:05
Show Gist options
  • Save ant1fact/49a51a260f65b3e1adc6b7d8d18d5d39 to your computer and use it in GitHub Desktop.
Save ant1fact/49a51a260f65b3e1adc6b7d8d18d5d39 to your computer and use it in GitHub Desktop.
Copy data from CSV w/ header into Postgres table
psql <database>
\COPY <table> (<optional list of columns>,) FROM <relative path to .csv> WITH CSV HEADER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment