Bulk loading into PostgreSQL: Options and comparison - Highg

Bulk loading into PostgreSQL: Options and comparison - Highgo Software Inc.


Load using the COPY command
COPY moves data between PostgreSQL tables and standard file-system files. The copy command comes in two variants, COPY TO and COPY FROM. The former copies the table content to the file, while we will use the latter to load data into the table from the file.
COPY sales_record FROM '/Users/muhammadusama/work/data/5m_Sales_Records.csv' CSV HEADER;
Load using psql ‘\copy’
\copy‘ is a
psql operation that runs an SQL COPY command, but instead of the server reading or writing the specified file, 
psql (client) reads or writes the file and routes the data between the server and the local file system. This means that file accessibility and privileges are those of the local user, not the server, and no SQL superuser privileges are required.

Related Keywords

Muhammad Usama , Highgo Software , Macbook Pro , Quad Core Intel , முஹம்மது ஊசாமா , மேக்புக் ப்ரொ , குவாட் கோர் இன்டெல் ,

© 2025 Vimarsana