Re: [GENERAL] Variable case database names - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [GENERAL] Variable case database names
Date
Msg-id Pine.LNX.4.21.0001202242260.349-100000@localhost.localdomain
Whole thread Raw
Responses Re: [HACKERS] Re: [GENERAL] Variable case database names
Re: [HACKERS] Re: [GENERAL] Variable case database names
List pgsql-hackers
There is some code in libpq which converts all database names to
lower-case, unless it's double quoted. That seems a little ill-conceived
to me, since you'd actually have to pass it something like
PGconnectdb("dbname=\"Newnham\"");

If anything, this would make it inconvenient it psql, because you'd have
to write
\c '"Newnham"'
since
\c "Newnham"
is interpreted differently.

Does anyone have an explanation for this? Why not leave the name as is?



On 2000-01-20, Patrick Welche mentioned:

>    List of databases
>   Database  |  Owner   
> ------------+----------
>  Newnham    | prlw1
> 
> % psql Newnham
> psql: connection to database "newnham" failed - FATAL 1:  Database "newnham" does not exist in the system catalog.
> 
> template1=> \c 'Newnham'
> FATAL 1:  Database "newnham" does not exist in the system catalog.
> Previous connection kept
> 
> 
> How can I connect to a database with a variable case name?
> 
> Cheers,
> 
> Patrick
> 
> ************
> 
> 

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] A notice for too long names
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] COPY problems with psql / libpq