pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Wei Weng <wweng@kencast.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Rename database?
Date: Mon, 27 Jan 2003 13:41:11 -0500 (EST)
Message-ID: <200301271841.h0RIfBc16053@candle.pha.pa.us> (raw)
In-Reply-To: <000c01c2c32b$09526500$5301a8c0@monet>


Uh, we have ALTER DATABASE, but it doesn't rename.  If no one is
connected, you can connect to template1 and modify pg_database table to
rename.  That _should_ work.

---------------------------------------------------------------------------

Wei Weng wrote:
> Can I use a SQL statement to rename database?
> 
> e.g Rename Database Bank to Database Bank_backup
> 
> Thanks!
> 
> Wei

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (3+ messages)

Message-ID: <200301271841.h0RIfBc16053@candle.pha.pa.us>
Permalink:  ../200301271841.h0RIfBc16053@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200301271841.h0RIfBc16053@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, wweng@kencast.com
  Subject: Re: Rename database?
  In-Reply-To: <200301271841.h0RIfBc16053@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox