Skip site navigation (1) Skip section navigation (2)

Re: Cannot restore table using pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Todd <pg(at)dbginc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot restore table using pg_restore
Date: 2008-11-25 18:47:09
Message-ID: 377.1227638829@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Bill Todd <pg(at)dbginc(dot)com> writes:
> I am trying to restore a table named contact in the contact schema. I 
> have tried two methods. The first is the command

> pg_restore --dbname=app --format=custom --schema=contact 
> --table=contact.contact --username=postgres --single-transaction 
> contact.backup

The correct incantation is
	--schema=contact --table=contact
You can use the qualified-name syntax in pg_dump's --table switch,
but nobody's gotten around to making pg_restore similarly bright.


> pg_restore -L contact.list contact.backup > result.txt
> This also runs without error but does not restore anything.

Well, in that form it's not supposed to do anything except emit SQL
into result.txt --- you probably want to use the -d switch, or else
pipe the SQL into psql.

			regards, tom lane

In response to

pgsql-general by date

Next:From: Dave PageDate: 2008-11-25 20:05:10
Subject: Re: Separate Sessions?? (View data <-> Query tool)
Previous:From: Csaba EgyüdDate: 2008-11-25 18:14:47
Subject: Separate Sessions?? (View data <-> Query tool)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group