Search Postgresql Archives

Re: Can't rename an existnig DB because it doesn't exist???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 12, 2008 at 10:03 AM, Gauthier, Dave
<dave.gauthier@xxxxxxxxx> 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?

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux