Re: [Patch]Add tab completion for DELETE ... USING

Поиск
Список
Период
Сортировка
От Chao Li
Тема Re: [Patch]Add tab completion for DELETE ... USING
Дата
Msg-id 0513C4A1-1FCF-45F0-97C4-A54B0B93CF57@gmail.com
обсуждение исходный текст
Ответ на [Patch]Add tab completion for DELETE ... USING  (Tatsuya Kawata <kawatatatsuya0913@gmail.com>)
Список pgsql-hackers

> On Dec 25, 2025, at 23:51, Tatsuya Kawata <kawatatatsuya0913@gmail.com> wrote:
>
> Hi,
>
> I noticed that tab completion for DELETE ... USING clause was not implemented. There was a TODO comment in
tab-complete.in.c:
>
> /* XXX: implement tab completion for DELETE ... USING */
> The attached patch implements this feature. The following completions are now supported:
>
> DELETE FROM <table> USING <TAB> -> suggests a list of tables
> DELETE FROM <table> USING <table> <TAB> -> suggests AS, WHERE
> DELETE FROM <table> USING <table> AS <alias> <TAB> -> suggests WHERE
> DELETE FROM <table> USING <table> <alias> <TAB> -> suggests WHERE (without AS keyword)
>
> I've also added tests for all these cases in 010_tab_completion.pl.
>
> Regards,
> Tatsuya Kawata
> <v1-0001-Add-tab-completion-for-DELETE-USING.patch>

Overall looks good to me. A very tiny nitpick:

Firs the first case:
```
+# check DELETE ... USING completion
+check_completion(
+    "DELETE FROM tab1 USING my\t",
+    qr/mytab/,
+    "complete DELETE FROM tab USING with table name");
```

Maybe just say “with tab”, because the rest test cases’ messages all say “USING tab”.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







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