Re: Load multiple CSV file in Postgres using COPY

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Load multiple CSV file in Postgres using COPY
Date: 2017-02-17 05:51:11
Message-ID: ed2912b2-4899-574d-0452-50bd71e007d6@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/16/2017 9:43 PM, Magnus Hagander wrote:
>
>
>
> Perhaps something like "COPY FROM PROGRAM 'cat /path/*.csv'" would
> work for you?

he's using HEADER, so cat wouldn't work. he's also using
MSDOS/WIndows style filenames, so cat won't work, anyways..

I'd suggest using something like pgloader, but I don't know if that runs
on MS Windows, either. its very powerful for doing bulk imports from a
wide range of formats, and even allows data manipulation.

--
john r pierce, recycling bits in santa cruz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2017-02-17 06:00:31 Re: Load multiple CSV file in Postgres using COPY
Previous Message Magnus Hagander 2017-02-17 05:43:30 Re: Load multiple CSV file in Postgres using COPY