On Fri, May 29, 2020 at 04:21:00PM +0200, Pavel Stehule wrote: > Hi > > one my customer has to specify dumped tables name by name. After years and > increasing database size and table numbers he has problem with too short > command line. He need to read the list of tables from file (or from stdin). > > I wrote simple PoC patch > > Comments, notes, ideas?
This seems like a handy addition. What I've done in cases similar to this was to use `grep -f` on the output of `pg_dump -l` to create a file suitable for `pg_dump -L`, or mash them together like this: pg_restore -L <(pg_dump -l /path/to/dumpfile | grep -f /path/to/listfile) -d new_db /path/to/dumpfile That's a lot of shell magic and obscure corners of commands to expect people to use. Would it make sense to expand this patch to handle other objects? Best, David. -- David Fetter <david(at)fetter(dot)org> http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate