Lists: | pgsql-general |
---|
From: | ruben <ruben20(at)superguai(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pg_restore does not restore |
Date: | 2004-10-25 22:28:49 |
Message-ID: | 417D7E21.4060306@superguai.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Hi:
I'm trying to dump tableA and restore it to tableB:
$ ./pg_dump -Fc -t tableA databaseA -f tableA.dump -v
$ ./pg_restore -t tableB -d databaseA tableA.dump -v
pg_dump creates tableA.dump aparently well, but after running pg_restore
without errors I cannot find any "tableB", what am I doing wrong?
I upgraded postgres version recently, the postmaster is running on port
5433, and pg_dump and pg_restore are now under /usr/local/pgsql/bin.
These are the outputs of the commands with -v (verbose):
$ ./pg_dump -Fc -t tableA databaseA -f tableA.dump -v
pg_dump: saving encoding
pg_dump: saving database definition
pg_dump: reading schemas
pg_dump: reading user-defined types
pg_dump: reading user-defined functions
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined tables
pg_dump: reading table inheritance information
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: finding the columns and types of table "tableA"
pg_dump: finding default expressions of table "tableA"
pg_dump: flagging inherited columns in subtables
pg_dump: dumping out database comment
pg_dump: dumping out user-defined schemas
pg_dump: dumping out user-defined types
pg_dump: dumping out tables
pg_dump: dumping out indexes
pg_dump: dumping out user-defined procedural languages
pg_dump: dumping out user-defined functions
pg_dump: dumping out user-defined aggregate functions
pg_dump: dumping out user-defined operators
pg_dump: dumping out user-defined operator classes
pg_dump: dumping out user-defined casts
pg_dump: preparing to dump the contents of table tableA
pg_dump: dumping out rules
pg_dump: dumping contents of table tableA
$ ./pg_restore -t tableA_borrar -d databaseA tableA.dump -v
pg_restore: connecting to database for restore
pg_restore: implied data-only restore
Thanks.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | ruben <ruben20(at)superguai(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_restore does not restore |
Date: | 2004-10-25 23:45:12 |
Message-ID: | 2320.1098747912@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
ruben <ruben20(at)superguai(dot)com> writes:
> I'm trying to dump tableA and restore it to tableB:
pg_dump does not do that. The -t switch is for selecting one table
among several, not for renaming anything.
regards, tom lane