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

Поиск
Список
Период
Сортировка
От Gauthier, Dave
Тема Re: Can't rename an existnig DB because it doesn't exist???
Дата
Msg-id 0836165E8EE50F40A3DD8F0D871372671D3339@azsmsx421.amr.corp.intel.com
обсуждение исходный текст
Ответ на Can't rename an existnig DB because it doesn't exist???  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Ответы Re: Can't rename an existnig DB because it doesn't exist???  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Can't rename an existnig DB because it doesn't exist???  ("Dean Gibson (DB Administrator)" <postgresql@ultimeth.com>)
Список pgsql-general
No schemas per-se.  After the initdb, I jump right in with "createdb
foo", "createdb foo2", etc... .

I don't think it's an encoding propbem.  The problem popped up after
running script that ran successfully for many months.  Somethign changed
(as it were).

Ya, I'm thinking of dumping all the problem DBs, deleting them,
recreating and reloading.

-dave

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Dean Gibson (DB
Administrator)
Sent: Thursday, March 13, 2008 12:45 PM
To: pgsql-general
Subject: Re: [GENERAL] Can't rename an existnig DB because it doesn't
exist???

On 2008-03-12 21:30, Scott Marlowe wrote:
> ...
>>  > 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?
>>
>>
Thoughts:

1. What SCHEMAs are these DBs in?  Perhaps a search_path issue (I
haven't followed all of this thread, so perhaps this has been
mentioned).

2. What are the current Linux command-line encoding (value of $LANG) and

the psql client_encoding?  Perhaps there is a non-displayable character
in the name.

3. You can probably delete it by:
  a. Creating a new schema "zzz".
  b. Moving everything else in the schema where stdb is, to the new
schema.
  c. Drop the existing schema (cascade).
  d. Rename schema "zzz" to the name of the previous schema.

--
Mail to my list address MUST be sent via the mailing list.
All other mail to my list address will bounce.


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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Selena Deckelmann"
Дата:
Сообщение: United States PostgreSQL Association launched!
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Reindex does not finish 8.2.6