Re: psql completion for ids in multibyte string

Поиск
Список
Период
Сортировка
От Kyotaro HORIGUCHI
Тема Re: psql completion for ids in multibyte string
Дата
Msg-id 20160226.143403.171459914.horiguchi.kyotaro@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: psql completion for ids in multibyte string  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: psql completion for ids in multibyte string  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Hello, this is the second patch plitted out. This allows
multibyte names to be completed in psql.

At Fri, 06 Nov 2015 11:47:17 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> wrote in
<20151106.114717.170526268.horiguchi.kyotaro@lab.ntt.co.jp>
> At Thu, 5 Nov 2015 18:32:59 +0900, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote in
<563B224B.3020400@lab.ntt.co.jp>
> > On 2015/11/05 18:10, Kyotaro HORIGUCHI wrote:
> > > Hello. I don't know whether this is a bug fix or improvement,
> > 
> > Would it be 50-50? :-)
> 
> Yeah, honestly saying, I doubt that this is valuable but feel
> uneasy to see some of the candidates vanish as completon proceeds
> for no persuasive reason.

The current version of tab-completion failed to complete names
with multibyte characters.

=# create table いろは (あ int);
=# create table いこい (あ int);
=# drop table <tab>
"いろは"             hint_plan.           pg_toast.
"いこい"             information_schema.  pg_toast_temp_1.
ALL IN TABLESPACE    pg_catalog.          public.
dbms_stats.          pg_temp_1.           
postgres=# alter table "い
=# drop table "い<tab>
=# drop table "い           /* No candidate offered */

This is because _complet_from_query counts the string length in
bytes, instead of characters. With this patch the candidates will
appear.

=# drop table "い<tab>
"いこい"  "いろは"  
postgres=# drpo table "い

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Fixing wrong comment on PQmblen and PQdsplen.
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.