From: | Ken Guest <kguest(at)stockbyte(dot)com> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: rename |
Date: | 2002-11-27 16:56:39 |
Message-ID: | 3DE4F947.7000608@stockbyte.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Neil Conway wrote:
>On Wed, 2002-11-27 at 09:29, Ken Guest wrote:
>
>
>>Guys,
>>Is it possible to rename databases, and what's the syntax I should
>>use?
>>
>>
>
>Well, it's *possible* -- you can manually update the system catalogs,
>like so:
>
>UPDATE pg_database SET datname = 'newname' WHERE datname = 'oldname';
>VACUUM FULL pg_database;
>
>(The VACUUM is required as pg_database is not MVCC-aware).
>
>However, this is not recommended operating procedure, if it destroys all
>your data I won't take any responsibility :-) A safer route would be to
>pg_dump the database and restore it with a different name.
>
>
so would pg_dump olddb | pgsql newdb work or this is too simplistic an
approach?
>
>
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-11-27 16:57:04 | Re: [GENERAL] FreeBSD, Linux: select, select count(*) performance |
Previous Message | Tom Lane | 2002-11-27 16:56:34 | Re: FreeBSD, Linux: select, select count(*) performance |