Sample Header Ad - 728x90

How can I use pg_dump to export a single table to CSV that can then be imported by Oracle SQL Loader?

0 votes
2 answers
1939 views
Thanks in advance for any help on this. **Problem Summary:** I'm looking for the most efficient way possible to export a single table from Postgres/Greenplum for a large number of records (100M+) so that it can be imported by Oracle SQL Loader. **Research Background:** I know from research thus far that the pg_dump utility is more efficient than Postgres COPY, so I do NOT want to use the COPY command. Using pg_dump has many pluses, and can: 1. Can use multiple threads/cores 2. Can dump a single table of output 3. but to CSV? **My Main Question:** The critical thing I can't figure out yet is how to get pg_dump to export to csv or fixed-width plain text output. **A sidebar question:** I can't seem to find a detailed description (other than, 'The pg_dump --format=custom means the data is compressed') of what exactly the "custom" pg_dump format does to the data. The word "custom" implies that the output should be to a controllable schema, but I haven't been able to locate documentation yet of how this works.
Asked by zigmoo (9 rep)
Oct 12, 2022, 04:39 PM
Last activity: May 14, 2025, 01:05 PM