pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddb rename
4+ messages / 4 participants
[nested] [flat]
* db rename
@ 2004-10-25 12:59 Jodi Kanter <jkanter@virginia.edu>
2004-10-25 13:12 ` Re: db rename Rajesh Kumar Mallah <mallah@trade-india.com>
2004-10-25 14:18 ` Re: db rename Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 4+ messages in thread
From: Jodi Kanter @ 2004-10-25 12:59 UTC (permalink / raw)
To: pgsql-admin
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 <mailto:jkanter@virginia.edu100>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: db rename
2004-10-25 12:59 db rename Jodi Kanter <jkanter@virginia.edu>
@ 2004-10-25 13:12 ` Rajesh Kumar Mallah <mallah@trade-india.com>
1 sibling, 0 replies; 4+ messages in thread
From: Rajesh Kumar Mallah @ 2004-10-25 13:12 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt><br>
Dear Jodi,<br>
<br>
<br>
psql>\h CREATE DATABASE<br>
Command: CREATE DATABASE<br>
Description: create a new database<br>
Syntax:<br>
CREATE DATABASE name<br>
[ [ WITH ] [ OWNER [=] dbowner ]<br>
[ LOCATION [=] 'dbpath' ]<br>
[ TEMPLATE [=] template ]<br>
[ ENCODING [=] encoding ] ]<br>
<br>
tradein_clients=#<br>
<br>
</tt><br>
You might consider using the TEMPLATE=template option<br>
by default its template1 , if you put the existing database name<br>
a replica of specified database is made<br>
<br>
Hope it helps.<br>
<br>
Regds<br>
Mallah.<br>
<br>
Jodi Kanter wrote:
<blockquote cite="mid417CF897.1020701@virginia.edu" type="cite">
<meta http-equiv="Content-Type" content="text/html;">
<title></title>
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.<br>
Is there a rename option out there for our version?<br>
thanks<br>
Jodi <br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 10 (filtered)">
<title>_______________________________</title>
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><i><span
style="font-size: 9pt; font-family: Arial;">_______________________________<br>
</span></i><i><span style="font-size: 10pt;">Jodi L Kanter<br>
BioInformatics Database Administrator<br>
University of Virginia<br>
(434) 924-2846<br>
<a href="mailto:jkanter@virginia.edu100">jkanter@virginia.edu</a></span></i></p>
<p class="MsoNormal"> </p>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
regds
Mallah.
Rajesh Kumar Mallah
+---------------------------------------------------+
| Tradeindia.com (3,11,246) Registered Users |
| Indias' Leading B2B eMarketPlace |
| <a class="moz-txt-link-freetext" href="http://www.tradeindia.com/">http://www.tradeindia.com/</a; |
+---------------------------------------------------+
</pre>
</body>
</html>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: db rename
2004-10-25 12:59 db rename Jodi Kanter <jkanter@virginia.edu>
@ 2004-10-25 14:18 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2004-10-25 14:18 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin
Jodi Kanter <jkanter@virginia.edu> 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: db rename
@ 2004-10-25 13:26 CHRIS HOOVER <CHRIS.HOOVER@companiongroup.com>
0 siblings, 0 replies; 4+ messages in thread
From: CHRIS HOOVER @ 2004-10-25 13:26 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin
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: <TAO@BCBSviaGCS@companion1.companiongroup.com120302-7d57:1449>
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename=""
syntax is:
update pg_database set datname=<new_name> where datname=<old_name>;
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 <mailto:jkanter@virginia.edu100>
--:-Fischer-Intl-Naples,Fl-*MIX*-120302--5271:6aaf:6ea7--*GCS*
Content-Type: application/octet-stream;
name="UnNamed.html"
Content-ID: <TAO@BCBSviaGCS@companion1.companiongroup.com120302-5d02:2899>
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="UnNamed.html"
PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEg
VHJhbnNpdGlvbmFsLy9FTiI+DQo8aHRtbD4NCjxoZWFkPg0KICA8bWV0YSBo
dHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDtj
aGFyc2V0PUlTTy04ODU5LTEiPg0KICA8dGl0bGU+PC90aXRsZT4NCjwvaGVh
ZD4NCjxib2R5IHRleHQ9IiMwMDAwMDAiIGJnY29sb3I9IiNmZmZmZmYiPg0K
SSB0aG91Z2h0IHRoZXJlIHdhcyBhbiBvcHRpb24gdG8gcmVuYW1lIGEgZGF0
YWJhc2U/IEkgY2Fubm90IHNlZW0gdG8NCmZpbmQgdGhlIHN5bnRheCBpbiBh
bnkgb2YgbXkgYm9va3Mgb3Igb24gdGhlIHdlYiBzaXRlLiBBbSBJIGluY29y
cmVjdD8NCldlIGFyZSBydW5uaW5nIDcuMy40LiBXZSBoYXZlIHRvIGJyaW5n
IG91ciBzeXRlbSBkb3duIHRvIHVwZ3JhZGUgdGhlDQpyZWxlYXNlIHRoaXMg
YWZ0ZXJub29uLiBUaGVyZSBhcmUgYSBudW1iZXIgb2YgZGIgY2hhbmdlcyB0
YWtpbmcgcGxhY2UNCnNvIEkgd2FzIHRoaW5raW5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KQHBhZ2UgU2VjdGlvbjENCgl7c2l6ZTo4LjVpbiAxMS4waW47
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*--
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2004-10-25 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-25 12:59 db rename Jodi Kanter <jkanter@virginia.edu>
2004-10-25 13:12 ` Rajesh Kumar Mallah <mallah@trade-india.com>
2004-10-25 14:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-10-25 13:26 Re: db rename CHRIS HOOVER <CHRIS.HOOVER@companiongroup.com>
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