De : ROCHER Julien <julien.rocher@emeria.eu> Date : mercredi, 11 janvier 2023 à 15:16 À : Julien Rouhaud <rjuju123@gmail.com> Objet : Re: TR: Issue: --exclude-schema flag not working with pgrestore
De : Julien Rouhaud <rjuju123@gmail.com> Date : mercredi, 11 janvier 2023 à 14:27 À : ROCHER Julien <julien.rocher@emeria.eu> Objet : Re: TR: Issue: --exclude-schema flag not working with pgrestore
On Wed, Jan 11, 2023 at 10:43:10AM +0000, ROCHER Julien wrote: > > Indeed this partially solved the problem. However, although it doesn’t try to > restore the “country.number" table, it still tries to create the “country” > schema. Do you think it’s wanted ?
Yes that's the wanted behavior. Per documentation:
-N schema / --exclude-schema=schema Do not restore objects that are in the named schema
So it filters objects **in** the schema but not the schema itself.
If you want to also ignore the CREATE SCHEMA order, or some fancier behavior, you need to use the --list / --use-list and cherry pick the parts you want to keep or discard.