[ADMIN] rename database

2008-02-06 Thread Nuwan Liyanage
Hi, I am trying to rename my database; I used the following command, Alter database postgres rename to post_dev; but I get a error saying that the "current database may not be renamed" I look at the documentation, and it says that I need to connect to a different database in order d

[ADMIN] rename database

2001-11-30 Thread Leong, Fushan
Hi : I am working on the procedure to restore a database from dump file ( pg_dump ). I am thinking to create a new database, then restore the dump file, drop the old database and rename the old database to new database. Do postgres has command to rename the database? ---

Re: [ADMIN] rename database

2008-02-06 Thread Nuwan Liyanage
Ok I think I got it. I just went ahead and updated the pg_database table and it works.. Nuwan Liyanage <[EMAIL PROTECTED]> wrote: Hi, I am trying to rename my database; I used the following command, Alter database postgres rename to post_dev; but I get a error saying that the "cu

Re: [ADMIN] rename database

2008-02-06 Thread Guillaume Lelarge
Nuwan Liyanage wrote: Ok I think I got it. I just went ahead and updated the pg_database table and it works.. A better way is to connect to another database (template1 for exemple, but you would better use another one) and fire your statement there. Updating system table can be dangerous.

Re: [ADMIN] rename database

2008-02-06 Thread Mag Gam
what's the right way to rename a database then? On Feb 6, 2008 5:33 PM, Guillaume Lelarge <[EMAIL PROTECTED]> wrote: > Nuwan Liyanage wrote: > > Ok I think I got it. I just went ahead and updated the pg_database table > > and it works.. > > > > A better way is to connect to another database (te

Re: [ADMIN] rename database

2008-02-06 Thread Robins Tharakan
o C 4. Reconnect to C Without step 2, step 3 would always spew the error about unable to rename the 'current database'. *Robins* -- Forwarded message -- From: Mag Gam <[EMAIL PROTECTED]> Date: Feb 7, 2008 9:22 AM Subject: Re: [ADMIN] rename database To: Guillaume Lelarge &