Re: PoC: pg_dump --filter-data (like Oracle Where Clause on RMAN for specific tables)
От | Greg Sabino Mullane |
---|---|
Тема | Re: PoC: pg_dump --filter-data |
Дата | |
Msg-id | CAKAnmmLYwUw0Kc4E-aBDeYNU=S+RxRx+CTXgBR6dvERAcUvUYQ@mail.gmail.com обсуждение исходный текст |
Ответ на |
PoC: pg_dump --filter-data |
Ответы |
Re: PoC: pg_dump --filter-data |
Список | pgsql-hackers |
I've seen this idea pop up over the years, and it's still a good one. Rather than invent new flags, I think a better approach would be to convince pg_dump to dump a view, such that table foo has a view fooslice to limit / filter the output. Then we can simply do:
pg_dump -t foo=view:fooslice
and under the hood pg_dump would do
COPY (SELECT * FROM fooslice) TO ...
rather than
COPY foo TO ...
While we could make the view mapping into a separate filtering file as you suggest, that's more complexity and also a little more dangerous in an action-at-a-distance way, so I'd rather have people be very specific in the mapping on the command line.
I could swear I made a POC years ago for something like this, but it's long gone. If I get some time, I'll give it a fresh attempt.
Cheers,
Greg
--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support
В списке pgsql-hackers по дате отправления: