From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Tab completion for ALTER INDEX|TABLE ALTER COLUMN SET STATISTICS |
Date: | 2018-11-28 04:14:28 |
Message-ID: | 20181128.131428.84607836.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello.
At Wed, 28 Nov 2018 11:27:23 +0900, Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <d677594b-101a-6236-7774-94a7c1a7b56b(at)lab(dot)ntt(dot)co(dot)jp>
> Hi,
>
> On 2018/11/26 11:05, Tatsuro Yamada wrote:
> I couldn't write patches details on previous email, so I write
> more explanation for that on this email.
>
>
> * tab_completion_alter_index_set_statistics.patch
> =======
> There are two problems. You can use these DDL before testing.
> #create table hoge (a integer, b integer);
> #create index ind_hoge on hoge (a, (a + b), (a * b));
>
> 1) Can't get column names
>
> # alter index ind_hoge alter column <tab!><tab!>... but can't complete.
Currently the only continueable rule to the rule is SET
STATISTICS so we usually expect the number of an expression
column there. Even though we actually name every expression
column in an index, users hardly see the names. The names are in
the index column number order in your example, but what if the
name of the first column were 'foo'?
=# alter index ind_hoge2 alter column
expr expr1 foo
We could still *guess* what is expr or exrp1 but I don't think it
helps much. (Note: foo is not usable in this context as it's a
non-expression column.)
> 2) I expected column names for column numbers after "SET STATISTICS",
> but
> tab-completion gave schema names
>
> # alter index ind_hoge alter column expr SET STATISTICS <tab!>
> information_schema. pg_catalog. pg_temp_1. pg_toast.
> pg_toast_temp_1. public.
This is the result of STATISTICS <things> completion. SET
STATISTICS always doesn't take statistics name so this is safe.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2018-11-28 04:17:50 | Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0 |
Previous Message | David Rowley | 2018-11-28 04:03:15 | Re: Query with high planning time at version 11.1 compared versions 10.5 and 11.0 |