psql \conninfo command (was: Patch: psql \whoami option)

Поиск
Список
Период
Сортировка
От David Christensen
Тема psql \conninfo command (was: Patch: psql \whoami option)
Дата
Msg-id D59F974B-365E-4BCD-92D1-5B763F4482DC@endpoint.com
обсуждение исходный текст
Ответ на Re: Patch: psql \whoami option  (David Christensen <david@endpoint.com>)
Ответы Re: psql \conninfo command (was: Patch: psql \whoami option)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Jul 18, 2010, at 12:33 PM, David Christensen wrote:

>
> On Jul 18, 2010, at 12:30 PM, Tom Lane wrote:
>
>> David Christensen <david@endpoint.com> writes:
>>> machack:machack:5432=# \c "foo""bar"
>>> You are now connected to database "foo"bar".
>>
>> What this is reflecting is that backslash commands have their own weird
>> rules for processing double quotes.  What I was concerned about was that
>> double quotes in SQL are normally used for protecting mixed case, and
>> you don't need that for \c:
>>
>> regression=# create database "FooBar";
>> CREATE DATABASE
>> regression=# \c foobar
>> FATAL:  database "foobar" does not exist
>> Previous connection kept
>> regression=# \c FooBar
>> You are now connected to database "FooBar".
>> FooBar=#
>>
>> The fact that there are double quotes around the database name in the
>> "You are now connected..." message is *not* meant to imply that that is
>> a valid double-quoted SQL identifier, either.  It's just an artifact of
>> how we set off names in English-language message style.  In another
>> language it might look like <<FooBar>> or some such.
>>
>> My opinion remains that you should just print the user and database
>> names as-is, without trying to inject any quoting into the mix.  You're
>> more likely to confuse people than help them if you do that.
>
>
> Okay, understood.  Then consider my updated patch (just sent attached to a recent message) to reflect the desired
behavior. (I'll update the commitfest patch entry when it shows up in the archives.) 


Updated the commitfest entry with the patch, updated the title to reflect the actual name of the command, and marked as
readyfor committer. 

Regards,

David
--
David Christensen
End Point Corporation
david@endpoint.com






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

Предыдущее
От: David Christensen
Дата:
Сообщение: Re: Patch: psql \whoami option
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: SHOW TABLES