Re: Is renaming a database easy or dangerous - Mailing list pgsql-general

From scott.marlowe
Subject Re: Is renaming a database easy or dangerous
Date
Msg-id Pine.LNX.4.33.0302270858500.18487-100000@css120.ihs.com
Whole thread Raw
In response to Is renaming a database easy or dangerous  (Hadley Willan <hadley.willan@deeperdesign.co.nz>)
Responses Re: Is renaming a database easy or dangerous  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
On 27 Feb 2003, Hadley Willan wrote:

> Hello,
>    I'd like to rename one of my databases. Is it is simple as changing
> the datname field in the pg_databases table?
>
> If so, is it done through ALTER database or a SQL update?

The way I do it is:

# createdb newdb
# pg_dump olddb|psql -e newdb
... check to make sure it's all there working, then...
# dropdb olddb


pgsql-general by date:

Previous
From: Christian Bucanac
Date:
Subject: Prepared queries in 7.2.x? and stmt caching
Next
From: Herbert Liechti
Date:
Subject: Re: pg_restore in debian postgresql 7.3.2-3