Re: Can't rename an existnig DB because it doesn't exist??? - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Can't rename an existnig DB because it doesn't exist???
Date
Msg-id dcc563d10803122130n510295c3t4e0cb7081f0c5925@mail.gmail.com
Whole thread Raw
In response to Can't rename an existnig DB because it doesn't exist???  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Responses Re: Can't rename an existnig DB because it doesn't exist???  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Can't rename an existnig DB because it doesn't exist???  ("Dean Gibson (DB Administrator)" <postgresql@ultimeth.com>)
List pgsql-general
You might want to keep this one on the list.  I'm out of my league
with this one I think

On Wed, Mar 12, 2008 at 11:24 AM, Gauthier, Dave
<dave.gauthier@intel.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.marlowe@gmail.com]
>  Sent: Wednesday, March 12, 2008 1:22 PM
>  To: Gauthier, Dave
>  Cc: pgsql-general@postgresql.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.gauthier@intel.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?
>

pgsql-general by date:

Previous
From: paul rivers
Date:
Subject: Re: postgre vs MySQL
Next
From: "Scott Marlowe"
Date:
Subject: Re: FROM + JOIN when more than one table in FROM