Re: Importing from CSV, auto creating table?

From: DiasCosta <diascosta(at)diascosta(dot)org>
To: stan <stanb(at)panix(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Importing from CSV, auto creating table?
Date: 2019-08-21 22:45:51
Message-ID: a987fd4c-27f3-7f2a-44d3-08ad911f8e0a@diascosta.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Stan,

I uploaded to the database (PostgreSQL 9.6), monthly and for several
years, over 50 000 000 csv records
using a version of pgtfutter that I compiled (with some changes if I
remember correctly) and the tables
were created in loading process from the column titles.

Dias Costa

On 21-08-2019 22:15, stan wrote:
> I have a situation where we need to import data, as an interim measure,
> from spreadsheets.
>
> I have read up on \copy and COPY, but I do not see that either of these can
> use the header from a CSV file to define a new table. Am I missing
> something?
>
> Also downloaded something called pgfutter, which I thought would do this,
> but have not had any success with this. After I (thought) I had figured out
> the arguments, it just seams to hag forever.
>
>

--
J. M. Dias Costa
Telef. 214026948

Se divulgar esta mensagem por terceiros, por favor:
1. Apague o meu endereço de correio electrónico e o meu nome.
2. Apague também os endereços dos seus amigos antes de distribuir.
3. Enderece como cópia oculta (Cc ou Bcc) para os SEUS destinatários.
Agindo deste modo, dificultará a disseminação de "vírus", "spams" e
"banners" e contribuirá para manter a privacidade de todos e cada um.
Obrigado.

Nota: Não se deverá ao acaso a ocorrência de palavras na minha escrita que não respeitem o
malfadado acordo ortográfico.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2019-08-21 23:05:11 Re: Complex filters -> Bad row estimates -> bad query plan
Previous Message David G. Johnston 2019-08-21 21:25:28 Re: Importing from CSV, auto creating table?