Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data

From: Jeremy Finzel <finzelj(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Carter Thaxton <carter(dot)thaxton(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data
Date: 2018-09-06 16:08:53
Message-ID: CAMa1XUhQK7A404GpkVmeEWw0j00cWuOTJxkP3Z=fSaOaudyR1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Just skimming the thread but I'd have to say being able to leverage
> pg_dump's dependency resolution is a major reason for adding features to it
> instead sticking to writing psql scripts. This feature in a multi-tenant
> situation is something with, I suspect, reasonably wide appeal.
>

That I would agree with if in fact it's true people want that, but that
wasn't how the problem trying to be solved was communicated. From what I
read in the initial examples given, just using psql is more than sufficient
in those cases.

I will grant that copying the structure and data at the same time would be
much easier, however. Because using psql, you need pg_dump to create your
structure then a separate psql script to copy the data.

But again with --data-only examples given, it's so easy to do that with
psql copy I just don't understand the value of the feature unless you
really are saying you require the dependency resolution.

I agree with some of the hesitation of complicating the syntax and allowing
too much customization for what pg_dump is designed for. Really, if you
need more customization, copy gives you that. So I don't personally
consider it a missing feature because both tools have different uses and I
haven't found that any of this disrupts my workflow. FWIW...

Thanks,
Jeremy

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2018-09-06 16:18:10 Re: pgsql: Allow extensions to install built as well as unbuilt headers.
Previous Message David G. Johnston 2018-09-06 15:47:50 Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data