Re: BUG #3691: bug in pg_restore - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3691: bug in pg_restore
Date
Msg-id 8198.1193071871@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3691: bug in pg_restore  ("Maryz" <mairambija@gmail.com>)
List pgsql-bugs
"Maryz" <mairambija@gmail.com> writes:
> Restore:
> pg_restore.exe -h localhost -p 5432 -U postgres -a postgres --format=c -a -i
> --disable-triggers  -t other.itm_blygis -v dmp\other.itm_blygis.out

pg_restore's -t switch doesn't do schemas.  You need something like
     -n other -t itm_blygis
instead.  This is something we should improve someday, but it's not a
bug --- it's operating as designed.

Actually, given that you selected only the one table while dumping, the
whole thing is a waste of typing effort, as are many of the other
switches you used.  There's no need to tell pg_restore not to restore
stuff that's not in the dump file, hm?

Another bit of advice: do not use the -i switch for either of these
programs.  Ever.  I do not know why the meme has spread that this switch
is a good thing to use by default.  What it is is a large-caliber foot
gun.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: BUG #3691: bug in pg_restore
Next
From: Tom Lane
Date:
Subject: Re: Cursor on an INTERSECT query assertion fails