Florian Weimer <[EMAIL PROTECTED]> writes:
> Is there a way to rename an existing database, short of dumping and
> restoring it?

In 7.1 or later a quick UPDATE on pg_database.datname should do it,
I believe.

It might be a bad idea to do it while there are any connections to
the target database --- I know that backends remember the name of the
DB they are connected to, but I forget whether it's actually used for
anything significant.

Also, vacuuming pg_database after committing the UPDATE might be
necessary, depending on just which version you are running.

                        regards, tom lane



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Reply via email to