Russell Smith <mr-r...@pws.com.au> writes:
> pg_restore silently ignores the inclusion of -C when you do use a
> restore list.

It would work as you expect if you use -C when creating the list file.
The reason for this is that -C basically means "don't skip the DATABASE
entry".  When you use -l without -C, you get a list file that doesn't
include the DATABASE entry.  In the last step, you need both -C and
the DATABASE entry listed in the list file in order to have the CREATE
DATABASE command emitted.

We could possibly "fix" this by emitting the DATABASE entry during -l
with or without -C.  I'm not sure if that would have any bad side
effects, but a quick test suggests that it will still skip the DATABASE
entry if it's listed in the list file but -C isn't given.  Of course,
if you manually remove the DATABASE entry from the list file, you lose
anyway.

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to