From: | "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
---|---|
To: | James Olin Oden <joden(at)Lee(dot)k12(dot)nc(dot)us>, Aleksey Dashevsky <postgres(at)luckynet(dot)co(dot)il> |
Cc: | Farzad FARID <farzy(at)publicis(dot)fr>, pgsql-general(at)postgreSQL(dot)org |
Subject: | RE: [GENERAL] How to rename a database? |
Date: | 1998-07-10 17:11:48 |
Message-ID: | F10BB1FAF801D111829B0060971D839F321573@cpsmail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
try:
pg_dump <old_database> > tmp.sql
then edit tmp.sql to change the old_database name to new_database name.
then:
cat tmp.sql | psql template1
-DEJ
> -----Original Message-----
> From: James Olin Oden [SMTP:joden(at)Lee(dot)k12(dot)nc(dot)us]
> Sent: Thursday, July 09, 1998 11:45 AM
> To: Aleksey Dashevsky
> Cc: Farzad FARID; pgsql-general(at)postgreSQL(dot)org
> Subject: Re: [GENERAL] How to rename a database?
>
>
> > Use following syntax:
> > alter table <Old_Table_Name> rename to <New_Table_Name>
> >
> >
>
> I don't think that will work for the entire database. Remember a
> table is
> part of the database. So I don't think alter will change the actual
> database's name...
>
> > >
> > > How do I rename an existing database? Is it enough to just rename
> the
> > > directory? If that's the only way to do it do I have to first shut
> the
> > > server down?
> > >
> > > --
> > > Farzad FARID
> > > Administrateur Reseau
> > > Publicis Technology
> > >
> > >
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jackson, DeJuan | 1998-07-10 17:22:29 | RE: [GENERAL] Triggers: options besides compiled code? |
Previous Message | Bruce Tong | 1998-07-10 14:04:06 | Re: [GENERAL] What to do with no foreign keys |