Re: [SPAM] COPY command & binary format

From: Cat <cat(at)zip(dot)com(dot)au>
To: Nicolas Paris <niparisco(at)gmail(dot)com>
Cc: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>, Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: [SPAM] COPY command & binary format
Date: 2016-05-10 13:08:47
Message-ID: 20160510130847.GB18865@zip.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 10, 2016 at 03:00:55PM +0200, Nicolas Paris wrote:
> > The way I want is :
> > csv -> binary -> postgresql
> >
> > Is this just to be quicker or are you going to add some business logic
> > while converting CSV data?
> > As you mentioned ETL, I assume the second, as I don't think that
> > converting CSV to binary and then loading it to PostgreSQL will be more
> > convenient than loading directly from CSV... as quicker as it can be, you
> > have anyway to load data from CSV.
> >
> ​
> Right, ETL process means huge business logic.
> get the data (csv or other) -> transform it -> produce a binary -> copy
> from binary from stdin ​
>
> Producing 100GO CSVs, is a waste of time.

Ah. You need to fiddle with the data. Then you need to weigh the pros of
something agnostic to Postgres's internals to something that needs to be
aware of them.

You will need to delve into the source code for data types more complex
than INTEGER, TEXT and BYTEA (which was the majority of my data when I
was just looking into it).

--
"A search of his car uncovered pornography, a homemade sex aid, women's
stockings and a Jack Russell terrier."
- http://www.dailytelegraph.com.au/news/wacky/indeed/story-e6frev20-1111118083480

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2016-05-10 13:50:10 Re: Using both ident and password in pg_hba.conf
Previous Message Cat 2016-05-10 13:06:13 Re: [SPAM] COPY command & binary format