Re: Patch: psql \whoami option

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch: psql \whoami option
Дата
Msg-id 11750.1277128853@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Patch: psql \whoami option  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Patch: psql \whoami option  (David Christensen <david@endpoint.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Jun 20, 2010 at 10:51 PM, Steve Singer <ssinger_pg@sympatico.ca> wrote:
>> One comment I have on the output format is that values (ie the database
>> name) are enclosed in double quotes but the values being quoted can contain
>> double quotes that are not being escaped.

This is the same as standard practice in just about every other
message...

> It seems like for user and database it might be sensible to apply
> PQescapeIdentifier to the value before printing it.

I think this would actually be a remarkably bad idea in this particular
instance, because in the majority of cases psql does not apply
identifier dequoting rules to user and database names.  What is printed
should be the same as what you'd need to give to \connect, for example.

> The port is, I guess, being stored as a string, but doesn't it have to
> be an integer?  In which case, why quote it at all?

Agreed, no need for quotes there.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Proposal for 9.1: WAL streaming from WAL buffers
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: extensible enum types