Re: Support tab completion for upper character inputs in psql

Поиск
Список
Период
Сортировка
От Dagfinn Ilmari Mannsåker
Тема Re: Support tab completion for upper character inputs in psql
Дата
Msg-id 8735l41ynm.fsf@wibble.ilmari.org
обсуждение исходный текст
Ответ на Re: Support tab completion for upper character inputs in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Support tab completion for upper character inputs in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com> writes:
>> Thanks for your V16 patch, I tested it. 
>> The results LGTM.
>
> Pushed, thanks for looking.

I wasn't following this thread, but I noticed a few small potential
improvements when I saw the commit.

First, as noted in the test, it doesn't preserve the case of the input
for keywords appended to the query result.  This is easily fixed by
using `pg_strdup_keyword_case()`, per the first attached patch.

The second might be more of a matter of style or opinion, but I noticed
a bunch of `if (foo) free(foo);`, which is redundant given that
`free(NULL)` is a no-op.  To simplify the code further, I also made
`escape_string(NULL)` be a no-op, returning `NULL`.

- ilmari


Вложения

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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: CREATEROLE and role ownership hierarchies
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?