Back to Developer Roadmap

Import and Export using COPY

src/data/roadmaps/postgresql-dba/content/[email protected]

4.0717 B
Original Source

Import and Export using COPY

In PostgreSQL, one of the fastest and most efficient ways to import and export data is by using the COPY command. The COPY command allows you to import data from a file, or to export data to a file from a table or a query result.

If you can't use the COPY command due to lack of privileges, consider using the \copy command in the psql client instead, which works similarly, but runs as the current user rather than the PostgreSQL server.

Learn more from the following resources: