Re: [GENERAL] Problem with pg_restore into new database

2008-11-17 Thread Mr. John
___ From: Raymond O'Donnell <[EMAIL PROTECTED]> To: Mr. John <[EMAIL PROTECTED]> Cc: pgsql-general@postgresql.org Sent: Monday, November 17, 2008 1:49:17 PM Subject: Re: [GENERAL] Problem with pg_restore into new database On 17/11/2008 11:26, Mr. John wrote: > I read pg

Re: [GENERAL] Problem with pg_restore into new database

2008-11-17 Thread Raymond O'Donnell
On 17/11/2008 11:26, Mr. John wrote: > I read pg_restore documentation and what I understood is that using > pg_restore.exe with -C will create the database named in backup archive > or specified with -d You have to connect to *some* database, as Postgres doesn't have the concept of just connec

Re: [GENERAL] Problem with pg_restore into new database

2008-11-17 Thread Mr. John
IL PROTECTED]> Cc: pgsql-general@postgresql.org Sent: Monday, November 17, 2008 12:08:00 PM Subject: Re: [GENERAL] Problem with pg_restore into new database Mr. John wrote: > tanks for reply. > > Why should I connect to a existing database to restore another one ? How do you issue a &qu

Re: [GENERAL] Problem with pg_restore into new database

2008-11-17 Thread Richard Huxton
Mr. John wrote: > tanks for reply. > > Why should I connect to a existing database to restore another one ? How do you issue a "CREATE DATABASE" command without being connected to something? > from documentation,pg_restore seems to can do this : > http://www.postgresql.org/docs/8.0/interactive/a

Re: [GENERAL] Problem with pg_restore into new database

2008-11-17 Thread Mr. John
November 17, 2008 11:31:28 AM Subject: Re: [GENERAL] Problem with pg_restore into new database Mr. John wrote: > but on the server is no database called _struct_fis_ > err_resto.txt file contents only "0". > > If I add -d > @echo off > "pg_restore.exe" -h

Re: [GENERAL] Problem with pg_restore into new database

2008-11-17 Thread Richard Huxton
Mr. John wrote: > but on the server is no database called _struct_fis_ > err_resto.txt file contents only "0". > > If I add -d > @echo off > "pg_restore.exe" -h 192.168.1.1 -p 5432 -U postgres -d "_struct_fis_" -C -v > "stru.tar" 2>>log_resto.txt > echo %errorlevel% >err_resto.txt > >

[GENERAL] Problem with pg_restore into new database

2008-11-17 Thread Mr. John
Hi. I use latest version of Postgre in windows XP I try to restore a database from .tar backup,into a new database.Using EMS Manager it works fine,my database is creating and restoring succesfully. My application creates a .bat file and run it,restore is unsuccesfully but file is : @echo off