PostgreSQL
Import/Export Commands
PostgreSQL's COPY command provides fast data import and export. Learn the difference between COPY and \copy for various use cases.
5 commands
Pro Tips
Use \copy for client-side files, COPY for server-side files.
Add 'WITH CSV HEADER' for CSV files with column headers.
Common Mistakes
COPY (without \) requires superuser and reads files on the server.