Top
Enterprise Postgres 17 Operation Guide

13.2.1 Loading Data

To load data from a file into a Fujitsu Enterprise Postgres table, execute the pgx_loader command in load mode.

Example

The example below loads the file /path/to/data.csv (2000 records) into table tbl using a degree of parallelism of 3.

$ pgx_loader load -j 3 -c "COPY tbl FROM '/path/to/data.csv' WITH CSV"
LOAD 2000

Point

If an external file contains data that violates the format or constraints, the data load may fail partway through, resulting in delays for routine tasks such as nightly batch processing. Therefore, it is recommended to remove the invalid data before executing the data load.

Note

The data inserted using this feature is dumped as a COPY command by the pg_dump command and the pg_dumpall command.

See

  • Refer to "pgx_loader" in the Reference for information on the command.

  • Refer to "COPY" in the PostgreSQL Documentation for information on the deployment destination and access privileges for external files.