Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data
Date
Msg-id CAKFQuwbPHH0JEcch0NcohMfdqcCBch-EpBSLA0ZyW+ecBMfEFA@mail.gmail.com
Whole thread Raw
In response to Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data  (Jeremy Finzel <finzelj@gmail.com>)
Responses Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data  (Jeremy Finzel <finzelj@gmail.com>)
List pgsql-hackers
On Thu, Sep 6, 2018 at 8:40 AM, Jeremy Finzel <finzelj@gmail.com> wrote:
Why not simply use \copy (select * from largetable where created_at >= '2018-05-01') to stdout? That is what I’ve always done when I need something like this and have not found it particularly bothersome but rather quite powerful. And here you have tons of flexibility because you can do joins and whatever else.

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.

David J.

pgsql-hackers by date:

Previous
From: Jeremy Finzel
Date:
Subject: Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data
Next
From: Jeremy Finzel
Date:
Subject: Re: Add --include-table-data-where option to pg_dump, to export onlya subset of table data