Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-05 Thread 任洪彩
Hmm...It seem like a wonderful solution. But, i can't change the way to restore. For some reason, the way to restore as follows. pg_restore -C -h xxx -p xxx -U xxx -d template1 -e -v xxx.pgdump Does any one can give a clarification about whether the dump file support modify? By the way, dump wi

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-05 Thread Adrian Klaver
On 06/05/2013 06:17 PM, 任洪彩 wrote: Hmm...It seem like a wonderful solution. But, i can't change the way to restore. Then you will not be able to do what you want. For some reason, the way to restore as follows. pg_restore -C -h xxx -p xxx -U xxx -d template1 -e -v xxx.pgdump Does any one can

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-05 Thread Adrian Klaver
On 06/05/2013 05:20 AM, 私人邮箱 wrote: > no,I can't... > > Actually the dump file comes from another site... So use the -f option to pg_restore to save the custom format file to a text file. Edit the text file and then run using psql. Ex: pg_restore -C -f whatever_name.sql /root/horen/rnwdump/

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-05 Thread 私人邮箱
no,I can't... Actually the dump file comes from another site... 在 2013-6-5,19:28,Raymond O'Donnell 写道: > On 05/06/2013 03:02, 任洪彩 wrote: >> Hi, >> Yes, you are right. >> But -d option not suitable for me. Because our flatform use -C option >> and -d template1 option to create the database desc

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-05 Thread Raymond O'Donnell
On 05/06/2013 13:20, 私人邮箱 wrote: > no,I can't... > > Actually the dump file comes from another site... > > > 在 2013-6-5,19:28,Raymond O'Donnell 写道: > >> On 05/06/2013 03:02, 任洪彩 wrote: >>> Hi, >>> Yes, you are right. >>> But -d option not suitable for me. Because our flatform use -C option >>>

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-05 Thread Raymond O'Donnell
On 05/06/2013 03:02, 任洪彩 wrote: > Hi, > Yes, you are right. > But -d option not suitable for me. Because our flatform use -C option > and -d template1 option to create the database described in the dump > file to restore the dump file. > > The whole command like this: > # /opt/nokiasiemens/SS_Post

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-04 Thread 任洪彩
Hi, Yes, you are right. But -d option not suitable for me. Because our flatform use -C option and -d template1 option to create the database described in the dump file to restore the dump file. The whole command like this: # /opt/nokiasiemens/SS_Postgres/bin/pg_restore -C -h CFPU-0 -p 5433 -U

Re: [GENERAL] How to modify dump files created by pg_dump

2013-06-04 Thread Raymond O'Donnell
On 04/06/2013 09:44, 任洪彩 wrote: > Hi, guys > > I have met a problem that do confused me. > > I created a dump file by pg_dump from database named "DBRNWHSB" with > parameters -b -o -Fc -Z 0. > As you know, at the beginning of the dump file contains some SQL > statements for create the database "