Re: Changing Database Name

From: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>
To: James Kelty <jamesk(at)ashlandagency(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Changing Database Name
Date: 2002-07-30 16:02:33
Message-ID: m38z3tqk4m.fsf@conexa.fciencias.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

James Kelty <jamesk(at)ashlandagency(dot)com> writes:

> Hello,
>
> Through a slight SNAFU, a new database was loaded (takes about 30 hours)
> with an incorrect name. I would like to change the name of the database,
> NOT the tables. How can I do this? Can someone point me to
> documentation? I haven't found any yet.

Not sure about side effects, but you can connect to the template1 data
base and execute something like

update pg_database set datname = 'newName' where datname = 'oldName';

HTH,
Manuel.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message knut.suebert 2002-07-30 19:22:46 delete other similar entries with timestamp <= timestamp+15min?
Previous Message James Kelty 2002-07-30 15:48:50 Changing Database Name