Tom Lane wrote:
>
> jik@foxinternet.net writes:
> > I have a feeling I can't do it, but is there a way to rename a dB?
>
> In 7.1 or later I think it would work to just UPDATE the db's row in
> pg_database. But don't blame me if this fails to work ... make a
> backup before you try it.
>
> regards, tom lane
Doesn't look like that works....you ruined my database, I bet they fire
me :P
jik-=# UPDATE pg_database SET datname='test34' WHERE datname='test2';
UPDATE 1
jik-=# \c test34
FATAL 1: Database "test34" does not exist in the system catalog.
Previous connection kept