| From: | Lennin Caro <lennin(dot)caro(at)yahoo(dot)com> | 
|---|---|
| To: | Postgres General List <pgsql-general(at)postgresql(dot)org>, William Garrison <postgres(at)mobydisk(dot)com> | 
| Subject: | Re: Error in ALTER DATABASE command | 
| Date: | 2008-09-24 14:40:22 | 
| Message-ID: | 593239.6715.qm@web59510.mail.ac4.yahoo.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
--- On Tue, 9/23/08, William Garrison <postgres(at)mobydisk(dot)com> wrote:
> From: William Garrison <postgres(at)mobydisk(dot)com>
> Subject: [GENERAL] Error in ALTER DATABASE command
> To: "Postgres General List" <pgsql-general(at)postgresql(dot)org>
> Date: Tuesday, September 23, 2008, 3:49 PM
> 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
> 
> This does not happen if you create the database using a
> manual query in 
> pgadmin, or if you use psql.  Both of those tools will
> create the 
> database as "mixedcase" instead of
> "MixedCase"
> 
> I am using:
> "PostgreSQL 8.2.9 on i686-pc-mingw32, compiled by GCC
> gcc.exe (GCC) 
> 3.4.2 (mingw-special)"
> 
> 
> I guess for now, I have to dump and reload my database. :(
> 
> Postgresql seems to force many things to lower case.  Is it
> a bug that 
> the admin tool lets you create a database with mixed case
> names?  Or is 
> it a bug that you cannot rename them thereafter?
> 
error i dont think so, teh pgadmin create the object whit the double quote (") implicit. Rename the database
ALTER DATABASE "MixedCase" RENAME TO mixedcase
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Fetter | 2008-09-24 15:05:18 | Re: Obfuscated stored procedures (was Re: Oracle and Postgresql) | 
| Previous Message | Devrim GÜNDÜZ | 2008-09-24 14:25:18 | Re: [GENERAL] 8.3.4 rpms for Opensuse10.3 64bit |