Re: Load data from a csv file without using COPY

From: Ravi Krishna <srkrishna(at)yahoo(dot)com>
To: Alban Hertroys <haramrae(at)gmail(dot)com>
Cc: PG mailing List <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Load data from a csv file without using COPY
Date: 2018-06-19 21:17:46
Message-ID: B1C1D70B-F13D-4AF9-A41E-9B83F09D6328@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> I think an easy approach would be to COPY the CSV files into a separate database using psql's \copy command and then pg_dump that as separate insert statements with pg_dump —inserts.
>

This was my first thought too. However, as I understand, pg_dump --insert basically runs INSERT INTO ... sql for every row.
In other words, each row is un-prepared and executed individually. That is also not real life scenario.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2018-06-19 21:23:11 Re: Load data from a csv file without using COPY
Previous Message Ravi Krishna 2018-06-19 21:14:53 Re: Load data from a csv file without using COPY