What you suggest is exactly the second option in the first message below but
that’s a real lot of overhead.
From: Melvin Davidson
Sent: Thursday, May 21, 2015 11:48 PM
To: Nicolas Paris
Cc: Stefan Stefanov ; Forums postgresql
Subject: Re: [GENERAL] About COPY command (and probably file fdw
Hi,
I agree, pgloader seems to be right. And yes, it’s a matter of complexity and
usability estimation.
Stefan
From: David G. Johnston
Sent: Friday, May 22, 2015 12:19 AM
To: Nicolas Paris
Cc: Stefan Stefanov ; Forums postgresql
Subject: Re: [GENERAL] About COPY command (and probably file fdw
t, DELIMITER E'\t', COLUMNS (1, 2, 7), ENCODING 'windows-1250')
BR, Stefan
---- Оригинално писмо ----
От: Nicolas Paris nipari...@gmail.com<mailto:nipari...@gmail.com>
Относно: Re: [GENERAL] About COPY command (and probably file fdw too)
До: Stefan Stefanov mailto:stef
On Thu, May 21, 2015 at 1:33 PM, Nicolas Paris wrote:
> Hi,
>
> To me this would be great. Why not the ability to restrict lines too
> COPY stafflist (userid, username, staffid)
> FROM 'myfile.txt'
> WITH (FORMAT text, DELIMITER E'\t', COLUMNS (1, 2, 7),
> LINES(2:1000,2000:3000), ENCODING 'windo
irst, second and seventh columns form myfile.txt into
>> table "stafflist". myfile.txt has many columns.
>> COPY stafflist (userid, username, staffid)
>> FROM 'myfile.txt'
>> WITH (FORMAT text, DELIMITER E'\t', COLUMNS (1, 2, 7), ENCODING
>&g
dows-1250')
>
> BR, Stefan
>
>
>
> ---- Оригинално писмо
> От: Nicolas Paris nipari...@gmail.com
> Относно: Re: [GENERAL] About COPY command (and probably file fdw too)
> До: Stefan Stefanov
> Изпратено на: 20.05.2015 23:21
>
>
> 2015-05-20 2
ri...@gmail.com
Относно: Re: [GENERAL] About COPY command (and probably file fdw too)
До: Stefan Stefanov
Изпратено на: 20.05.2015 23:21
2015-05-20 22:16 GMT+02:00 Stefan Stefanov
stefanov...@abv.bg > :
2015-05-20 22:16 GMT+02:00 Stefan Stefanov :
> Hi,
>
> I have been using COPY .. FROM a lot these days for reading in tabular
> data and it does a very good job. Still there is an inconvenience when a
> (large) text file contains more columns than the target table or the
> columns’ order differ
Hi,
I have been using COPY .. FROM a lot these days for reading in tabular data and
it does a very good job. Still there is an inconvenience when a (large) text
file contains more columns than the target table or the columns’ order differs.
I can imagine three ways round and none is really nic