Re: Change the name of the database - Mailing list pgsql-novice

From Tom Lane
Subject Re: Change the name of the database
Date
Msg-id 1913.1105976573@sss.pgh.pa.us
Whole thread Raw
In response to Re: Change the name of the database  (Chris Mair <list@1006.org>)
List pgsql-novice
Chris Mair <list@1006.org> writes:
>> I'm trying to change the name of my psql database.
>> Does it exist any command to do this.

> just issue this command:
>   alter database old_db_name rename to new_db_name;

Note that this command exists only since PG 7.4.  In earlier releases,
you can fake it by executing a manual UPDATE on pg_database.  (Beware
that you need to do a CHECKPOINT afterware to be sure that newly
connecting backends will see the updated name.)

            regards, tom lane

pgsql-novice by date:

Previous
From: "Sean Davis"
Date:
Subject: Re: Sql query as input variable in a PL/pgsql function?
Next
From: Jaime Casanova
Date:
Subject: Re: Updating views : cannot figure out what goes wrong