From jkanter@virginia.edu Mon Oct 25 12:59:13 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0B5333A403C for ; Mon, 25 Oct 2004 13:59:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72938-05 for ; Mon, 25 Oct 2004 12:59:03 +0000 (GMT) Received: from fork12.mail.virginia.edu (fork12.mail.Virginia.EDU [128.143.2.182]) by svr1.postgresql.org (Postfix) with ESMTP id 0E3E13A400C for ; Mon, 25 Oct 2004 13:59:05 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by fork12.mail.virginia.edu (Postfix) with ESMTP id 98CED1F5240 for ; Mon, 25 Oct 2004 08:59:05 -0400 (EDT) Received: from fork12.mail.virginia.edu ([127.0.0.1]) by localhost (fork12.mail.virginia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20332-08 for ; Mon, 25 Oct 2004 08:59:05 -0400 (EDT) Received: from virginia.edu (d-137-133-131.bootp.Virginia.EDU [137.54.133.131]) by fork12.mail.virginia.edu (Postfix) with ESMTP id 50FEF1F5227 for ; Mon, 25 Oct 2004 08:59:05 -0400 (EDT) Message-ID: <417CF897.1020701@virginia.edu> Date: Mon, 25 Oct 2004 08:59:03 -0400 From: Jodi Kanter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Postgres Admin List Subject: db rename Content-Type: multipart/alternative; boundary="------------010901040205010401060309" X-UVA-Virus-Scanned: by amavisd-new at fork12.mail.virginia.edu X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.0 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: * X-Archive-Number: 200410/328 X-Sequence-Number: 15321 This is a multi-part message in MIME format. --------------010901040205010401060309 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I thought there was an option to rename a database? I cannot seem to find the syntax in any of my books or on the web site. Am I incorrect? We are running 7.3.4. We have to bring our sytem down to upgrade the release this afternoon. There are a number of db changes taking place so I was thinking instead of taking the system down for an extended amount of time I could build another database with all our new items and then just rename it when we are ready. Is there a rename option out there for our version? thanks Jodi -- _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu --------------010901040205010401060309 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit I thought there was an option to rename a database? I cannot seem to find the syntax in any of my books or on the web site. Am I incorrect? We are running 7.3.4. We have to bring our sytem down to upgrade the release this afternoon. There are a number of db changes taking place so I was thinking instead of taking the system down for an extended amount of time I could build another database with all our new items and then just rename it when we are ready.
Is there a rename option out there for our version?
thanks
Jodi
--
_______________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu

 

--------------010901040205010401060309-- From mallah@trade-india.com Mon Oct 25 13:11:16 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 43DF33A403A for ; Mon, 25 Oct 2004 14:11:16 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78325-03 for ; Mon, 25 Oct 2004 13:11:06 +0000 (GMT) Received: from trade-india.com (unknown [203.101.29.36]) by svr1.postgresql.org (Postfix) with SMTP id A6C563A4052 for ; Mon, 25 Oct 2004 14:11:03 +0100 (BST) Received: (qmail 23369 invoked from network); 25 Oct 2004 13:05:16 -0000 Received: from system100.trade-india-local.com (HELO ?192.168.0.100?) (192.168.0.100) by system66.trade-india-local.com with SMTP; 25 Oct 2004 13:05:16 -0000 Message-ID: <417CFBB5.9090907@trade-india.com> Date: Mon, 25 Oct 2004 18:42:21 +0530 From: Rajesh Kumar Mallah User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jodi Kanter Cc: Postgres Admin List Subject: Re: db rename References: <417CF897.1020701@virginia.edu> In-Reply-To: <417CF897.1020701@virginia.edu> Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.8 tagged_above=0.0 required=5.0 tests=HTML_50_60, HTML_MESSAGE, HTML_TITLE_EMPTY, MIME_HTML_ONLY X-Spam-Level: X-Archive-Number: 200410/329 X-Sequence-Number: 15322
Dear Jodi,


psql>\h CREATE DATABASE
Command:     CREATE DATABASE
Description: create a new database
Syntax:
CREATE DATABASE name
    [ [ WITH ] [ OWNER [=] dbowner ]
           [ LOCATION [=] 'dbpath' ]
           [ TEMPLATE [=] template ]
           [ ENCODING [=] encoding ] ]

tradein_clients=#


You might consider using the TEMPLATE=template option
by default its template1 , if you put the existing database name
a replica of specified database is made

Hope it helps.

Regds
Mallah.

Jodi Kanter wrote:
I thought there was an option to rename a database? I cannot seem to find the syntax in any of my books or on the web site. Am I incorrect? We are running 7.3.4. We have to bring our sytem down to upgrade the release this afternoon. There are a number of db changes taking place so I was thinking instead of taking the system down for an extended amount of time I could build another database with all our new items and then just rename it when we are ready.
Is there a rename option out there for our version?
thanks
Jodi
--
_______________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu

 



-- 

regds
Mallah.

Rajesh Kumar Mallah
+---------------------------------------------------+
| Tradeindia.com  (3,11,246) Registered Users 	    | 
| Indias' Leading B2B eMarketPlace                  |
| http://www.tradeindia.com/			    |
+---------------------------------------------------+
From CHRIS.HOOVER@companiongroup.com Mon Oct 25 13:30:22 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6C0343A4015 for ; Mon, 25 Oct 2004 14:30:22 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86162-02 for ; Mon, 25 Oct 2004 13:30:09 +0000 (GMT) Received: from bcbssc.com (mail1.bcbssc.com [207.19.198.69]) by svr1.postgresql.org (Postfix) with ESMTP id 4C6F03A3FF3 for ; Mon, 25 Oct 2004 14:30:08 +0100 (BST) Received: from ([207.19.198.73]) by mail1.bcbssc.com with ESMTP id KP-TRPV8.5053362; Mon, 25 Oct 2004 09:29:05 -0400 X-Internal-ID: 417C824B000008A8 Received: from companiongroup.com (207.19.198.73) by companion1.companiongroup.com (NPlex 2.0.108); 25 Oct 2004 09:29:19 -0400 Message-ID: Date: Mon, 25 Oct 2004 09:26:00 -0400 From: "CHRIS HOOVER" To: Jodi Kanter Cc: Postgres Admin List MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="--:-Fischer-Intl-Naples,Fl-*MIX*-120302--5271:6aaf:6ea7--*GCS*" Subject: Re: db rename X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/330 X-Sequence-Number: 15323 This is the preamble of a multipart MIME formatted message. If you are reading this text your mail system is most likely not capable of properly decoding MIME messages. To extract the contents of this message, save it to a file and then use an external MIME decoding utility. --:-Fischer-Intl-Naples,Fl-*MIX*-120302--5271:6aaf:6ea7--*GCS* Content-Type: text/plain; charset="ISO-8859-1" Content-ID: Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="" syntax is: update pg_database set datname= where datname=; checkpoint; HTH, Chris ------------------( Forwarded letter 1 follows )--------------------- Date: Mon, 25 Oct 2004 08:59:03 -0400 To: Postgres.Admin.List[pgsql-admin]@postgresql.org.comp From: Jodi.Kanter[jkanter]@virginia.edu.comp Sender: pgsql-admin-owner+m15321@postgresql.org.comp Subject: [ADMIN] db rename I thought there was an option to rename a database? I cannot seem to find the syntax in any of my books or on the web site. Am I incorrect? We are running 7.3.4. We have to bring our sytem down to upgrade the release this afternoon. There are a number of db changes taking place so I was thinking instead of taking the system down for an extended amount of time I could build another database with all our new items and then just rename it when we are ready. Is there a rename option out there for our version? thanks Jodi -- _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu --:-Fischer-Intl-Naples,Fl-*MIX*-120302--5271:6aaf:6ea7--*GCS* Content-Type: application/octet-stream; name="UnNamed.html" Content-ID: Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="UnNamed.html" PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEg VHJhbnNpdGlvbmFsLy9FTiI+DQo8aHRtbD4NCjxoZWFkPg0KICA8bWV0YSBo dHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDtj aGFyc2V0PUlTTy04ODU5LTEiPg0KICA8dGl0bGU+PC90aXRsZT4NCjwvaGVh ZD4NCjxib2R5IHRleHQ9IiMwMDAwMDAiIGJnY29sb3I9IiNmZmZmZmYiPg0K SSB0aG91Z2h0IHRoZXJlIHdhcyBhbiBvcHRpb24gdG8gcmVuYW1lIGEgZGF0 YWJhc2U/IEkgY2Fubm90IHNlZW0gdG8NCmZpbmQgdGhlIHN5bnRheCBpbiBh bnkgb2YgbXkgYm9va3Mgb3Igb24gdGhlIHdlYiBzaXRlLiBBbSBJIGluY29y cmVjdD8NCldlIGFyZSBydW5uaW5nIDcuMy40LiBXZSBoYXZlIHRvIGJyaW5n IG91ciBzeXRlbSBkb3duIHRvIHVwZ3JhZGUgdGhlDQpyZWxlYXNlIHRoaXMg YWZ0ZXJub29uLiBUaGVyZSBhcmUgYSBudW1iZXIgb2YgZGIgY2hhbmdlcyB0 YWtpbmcgcGxhY2UNCnNvIEkgd2FzIH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gU2VjdGlvbjENCgl7c2l6ZTo4LjVpbiAxMS4waW47 DQoJbWFyZ2luOjEuMGluIDEuMjVpbiAxLjBpbiAxLjI1aW47fQ0KZGl2LlNl Y3Rpb24xDQoJe3BhZ2U6U2VjdGlvbjE7fQ0KLS0+DQo8L3N0eWxlPg0KPGRp diBjbGFzcz0iU2VjdGlvbjEiPg0KPHAgY2xhc3M9Ik1zb05vcm1hbCI+PGk+ PHNwYW4NCiBzdHlsZT0iZm9udC1zaXplOiA5cHQ7IGZvbnQtZmFtaWx5OiBB cmlhbDsiPl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX188YnI+DQo8 L3NwYW4+PC9pPjxpPjxzcGFuIHN0eWxlPSJmb250LXNpemU6IDEwcHQ7Ij5K b2RpIEwgS2FudGVyPGJyPg0KQmlvSW5mb3JtYXRpY3MgRGF0YWJhc2UgQWRt aW5pc3RyYXRvcjxicj4NClVuaXZlcnNpdHkgb2YgVmlyZ2luaWE8YnI+DQoo NDM0KSA5MjQtMjg0Njxicj4NCjxhIGhyZWY9Im1haWx0bzpqa2FudGVyQHZp cmdpbmlhLmVkdTEwMCI+amthbnRlckB2aXJnaW5pYS5lZHU8L2E+PC9zcGFu PjwvaT48L3A+DQo8cCBjbGFzcz0iTXNvTm9ybWFsIj4mbmJzcDs8L3A+DQo8 L2Rpdj4NCjwvZGl2Pg0KPC9ib2R5Pg0KPC9odG1sPg0KDQo= --:-Fischer-Intl-Naples,Fl-*MIX*-120302--5271:6aaf:6ea7--*GCS*-- From tgl@sss.pgh.pa.us Mon Oct 25 14:18:12 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E618C3A2B23 for ; Mon, 25 Oct 2004 15:18:12 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02278-06 for ; Mon, 25 Oct 2004 14:18:03 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0B2823A403A for ; Mon, 25 Oct 2004 15:18:06 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9PEI6vw018282; Mon, 25 Oct 2004 10:18:06 -0400 (EDT) To: Jodi Kanter Cc: Postgres Admin List Subject: Re: db rename In-reply-to: <417CF897.1020701@virginia.edu> References: <417CF897.1020701@virginia.edu> Comments: In-reply-to Jodi Kanter message dated "Mon, 25 Oct 2004 08:59:03 -0400" Date: Mon, 25 Oct 2004 10:18:06 -0400 Message-ID: <18281.1098713886@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/332 X-Sequence-Number: 15325 Jodi Kanter writes: > I thought there was an option to rename a database? No, but you could always do an UPDATE on pg_database. It might be a good idea to ensure there are no backends running in the target database when you do the update. (I think that recent releases wouldn't care particularly, but I'm less sure about 7.3.4.) regards, tom lane