Re: Importing from CSV, auto creating table?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: stan <stanb(at)panix(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Importing from CSV, auto creating table?
Date: 2019-08-21 21:25:28
Message-ID: CAKFQuwYj5kcEfD_4d6uL0benif_WQ8fDzY_+ogqk_G6U5yq=Ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 21, 2019 at 2:15 PM stan <stanb(at)panix(dot)com> 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?
>
>
Nope. You need to create the table separately - or find a tool that will
do that creation for you.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message DiasCosta 2019-08-21 22:45:51 Re: Importing from CSV, auto creating table?
Previous Message Mathieu Fenniak 2019-08-21 21:18:58 Re: Complex filters -> Bad row estimates -> bad query plan