Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B7CE22E4316 for ; Wed, 6 Feb 2008 23:53:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 27085-05 for ; Wed, 6 Feb 2008 23:52:44 -0400 (AST) Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.224]) by postgresql.org (Postfix) with ESMTP id 061E52E3348 for ; Wed, 6 Feb 2008 23:52:53 -0400 (AST) Received: by qb-out-0506.google.com with SMTP id o12so5458940qba.17 for ; Wed, 06 Feb 2008 19:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=b/9SPDuxsrfR5grbpM2isCrF/YsCMEJq1BtkRPrbmho=; b=QSyL0xQWyvdzfZH5l5YtWoaolUsVKMsUgHl+BcMazO5dwBMVm620ucFswECsye4GvWO/TuE17v285wvmJ5c+CX/XM6CnCJoma1I/7SOqHlLdk3JeeOm3L2xHw1HfV9XFnWqaCCcBG78K2b6VJvMMEcPwN5+0ADouI9zHa3t+zaw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=sUQq84iqPfsXUGPK7PDZ0IEtp3CgUgKrX3znPxc9Hjd7U7E7Zhzwg4TvhnOumimtu+0W9V4mHnZ0+HqePmsy4CtgWgpIHHslbXJCoUO7S7/T666LHlXfogtkPpwlmQiqXnhUpQq/X5TtNyhtZ+ktvIJPOSVGQ5xQWfZiSCbbONo= Received: by 10.142.132.2 with SMTP id f2mr686688wfd.221.1202356371369; Wed, 06 Feb 2008 19:52:51 -0800 (PST) Received: by 10.142.174.15 with HTTP; Wed, 6 Feb 2008 19:52:51 -0800 (PST) Message-ID: <1cbd6f830802061952h49210b36w21d66da6f33aa925@mail.gmail.com> Date: Wed, 6 Feb 2008 22:52:51 -0500 From: "Mag Gam" To: "Guillaume Lelarge" Subject: Re: rename database Cc: "Nuwan Liyanage" , pgsql-admin@postgresql.org In-Reply-To: <47AA35C5.6080600@lelarge.info> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17732_10949649.1202356371368" References: <465222.91055.qm@web46015.mail.sp1.yahoo.com> <47AA35C5.6080600@lelarge.info> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/71 X-Sequence-Number: 28145 ------=_Part_17732_10949649.1202356371368 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline what's the right way to rename a database then? On Feb 6, 2008 5:33 PM, Guillaume Lelarge wrote: > Nuwan Liyanage wrote: > > Ok I think I got it. I just went ahead and updated the pg_database table > > and it works.. > > > > A better way is to connect to another database (template1 for exemple, > but you would better use another one) and fire your statement there. > > Updating system table can be dangerous. > > > -- > Guillaume. > http://www.postgresqlfr.org > http://dalibo.com > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > ------=_Part_17732_10949649.1202356371368 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline what's the right way to rename a database then?



On Feb 6, 2008 5:33 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
Nuwan Liyanage wrote:
> Ok I think I got it. I just went ahead and updated the pg_database table
> and it works..
>

A better way is to connect to another database (template1 for exemple,
but you would better use another one) and fire your statement there.

Updating system table can be dangerous.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

------=_Part_17732_10949649.1202356371368--