Re: Rename database? - Mailing list pgsql-sql

From codeWarrior
Subject Re: Rename database?
Date
Msg-id b0qcit$1vpv$1@news.hub.org
Whole thread Raw
In response to Rename database?  ("Wei Weng" <wweng@kencast.com>)
List pgsql-sql
No.

Try instead

CREATE DATABASE newname FROM TEMPLATE oldname;
DROP DATABASE oldname;


""Wei Weng"" <wweng@kencast.com> wrote in message
news:000c01c2c32b$09526500$5301a8c0@monet...
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0009_01C2C301.1FA1DB80
> Content-Type: text/plain;
> charset="Windows-1252"
> Content-Transfer-Encoding: quoted-printable
>
> Can I use a SQL statement to rename database?
>
> e.g Rename Database Bank to Database Bank_backup
>
> Thanks!
>
> Wei
>
> ------=_NextPart_000_0009_01C2C301.1FA1DB80
> Content-Type: text/html;
> charset="Windows-1252"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html;
charset=3Dwindows-125=
> 2">
> <META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT size=3D2>Can I use a SQL statement to rename
database?</FONT></D=
> IV>
> <DIV><FONT size=3D2></FONT> </DIV>
> <DIV><FONT size=3D2>e.g Rename Database Bank to Database
Bank_backup</FONT>=
> </DIV>
> <DIV><FONT size=3D2></FONT> </DIV>
> <DIV><FONT size=3D2>Thanks!</FONT></DIV>
> <DIV><FONT size=3D2></FONT> </DIV>
> <DIV><FONT size=3D2>Wei</FONT></DIV>
> <DIV> </DIV></BODY></HTML>
>
> ------=_NextPart_000_0009_01C2C301.1FA1DB80--
>




pgsql-sql by date:

Previous
From: DA Morgan
Date:
Subject: Re: double linked list
Next
From: Boris Klug
Date:
Subject: Please include hier-patch in next PostgreSQL version