dbTalk Databases Forums  

pg_restore does not restore

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss pg_restore does not restore in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ruben
 
Posts: n/a

Default pg_restore does not restore - 10-25-2004 , 05:28 PM






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.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: pg_restore does not restore - 10-25-2004 , 06:45 PM






ruben <ruben20 (AT) superguai (DOT) com> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.