Re: Error in ALTER DATABASE command

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: Error in ALTER DATABASE command
Дата
Msg-id 48D9127E.4060402@pinpointresearch.com
обсуждение исходный текст
Ответ на Error in ALTER DATABASE command  (William Garrison <postgres@mobydisk.com>)
Список pgsql-general
William Garrison wrote:
> In Postgresql 8.2.9 on Windows, you cannot rename a database if the
> name contains mixed case.
>
> To replicate:
> 1) Open the pgadmin tool.
> 2) Create a database named "MixedCase" (using the UI, not using a
> query window or using PSQL)
> 3) Open a query window, or use PSQL to issue the following command
>    ALTER DATABASE MixedCase RENAME TO anything_else;
> PostgreSQL will respond with:
>    ERROR: database "mixedcase" does not exist
>    SQL state: 3D000
Did you try:
ALTER DATABASE "MixedCase"....?

Note the use of double-quotes around the name. I don't have any Windows
machines to try this with but it appears you just need to add the
double-quotes to prevent PostgreSQL from folding to lower-case.

Cheers,
Steve


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

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Error in ALTER DATABASE command
Следующее
От: William Garrison
Дата:
Сообщение: pg_dump | pg_sql: insert commands and foreign key constraints