Re: About COPY command (and probably file fdw too)

From: "Stefan Stefanov" <stefanov(dot)sm(at)abv(dot)bg>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "Nicolas Paris" <niparisco(at)gmail(dot)com>
Cc: "Forums postgresql" <pgsql-general(at)postgresql(dot)org>
Subject: Re: About COPY command (and probably file fdw too)
Date: 2015-05-22 21:02:42
Message-ID: 2F57AD5B447948489394E3587394600B@mbmbg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 too)

On Thu, May 21, 2015 at 1:33 PM, Nicolas Paris <niparisco(at)gmail(dot)com> 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 'windows-1250')

=> subset of full data.

​At some level of complexity it is questionable whether a feature belongs in core that can exist outside of it.
While I have not yet personally used pgloader it seems to accomplish much of what is being requested.
http://pgloader.io/index.html
COPY (and \copy) serves its purpose extremely well​ ​but expects the user to deal with any customization needed either before or after it has done its thing. I believe this is for the best since such customizations and tools have no need to operate on the same release cycle as the core PostgreSQL project.
David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Stefanov 2015-05-22 21:11:32 Re: About COPY command (and probably file fdw too)
Previous Message David G. Johnston 2015-05-22 17:51:07 Re: FW: Constraint exclusion in partitions