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.