From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>, "PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Can't rename an existnig DB because it doesn't exist??? |
Date: | 2008-03-13 04:54:19 |
Message-ID: | 20080312215419.1b1e988c@jd-laptop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 12 Mar 2008 21:30:57 -0700
"Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> wrote:
> You might want to keep this one on the list. I'm out of my league
> with this one I think
Can you pg_dump the database? What about vacuum? What does:
SELECT * FROM pg_database; Return?
J
>
> On Wed, Mar 12, 2008 at 11:24 AM, Gauthier, Dave
> <dave(dot)gauthier(at)intel(dot)com> wrote:
> > stdb2=# select '|'||datname||'|' from pg_database ;
> > ?column?
> > ----------------
> > |postgres|
> > |template1|
> > |template0|
> > |cells_dev|
> > |stdb2|
> > |stdb|
> > |stdb_standby|
> > |cells|
> > (8 rows)
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Scott Marlowe [mailto:scott(dot)marlowe(at)gmail(dot)com]
> > Sent: Wednesday, March 12, 2008 1:22 PM
> > To: Gauthier, Dave
> > Cc: pgsql-general(at)postgresql(dot)org
> > Subject: Re: [GENERAL] Can't rename an existnig DB because it
> > doesn't exist???
> >
> > On Wed, Mar 12, 2008 at 10:03 AM, Gauthier, Dave
> > <dave(dot)gauthier(at)intel(dot)com> wrote:
> > >
> > >
> > > V8.2.0 on Linux
> >
> > Look into updating, there were some serious bugs fixed between
> > 8.2.0 and 8.2.6 It's a pretty simple thing, since you don't need
> > to dump / reload for it.
> >
> > >
> > > Can't rename a db, complains that it doesn't exist. Yet psql -l
> > > shows
> > that
> > > it does and I can connect to it ???
> > >
> > >
> > >
> > > mmdcc228_SETUP(120)% psql stdb2 -c "alter database stdb rename to
> > stdb_tmp"
> > >
> > > ERROR: database "stdb" does not exist
> > >
> > > mmdcc228_SETUP(121)% psql -l
> > >
> > > List of databases
> > >
> > > Name | Owner | Encoding
> > >
> > > --------------+----------+----------
> > > stdb | dfgauthi | UTF8
> > >
> > > stdb2 | dfgauthi | UTF8
> > >
> > > stdb_standby | dfgauthi | UTF8
> >
> > Very strange. maybe the name has a space in it?
> >
> > Try running this query:
> > select '|'||datname||'|' from pg_database ;
> > and see if you have a space or something in there. can you run the
> > alter database rename from the command line and just not from psql?
> >
>
--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL SPI Liaison | SPI Director | PostgreSQL political pundit
From | Date | Subject | |
---|---|---|---|
Next Message | Blair Bethwaite | 2008-03-13 04:58:51 | Duplicate key violation on UPDATE |
Previous Message | Scott Marlowe | 2008-03-13 04:40:28 | Re: Column Statistics - How to dertermine for whole database |