| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Soumya S Murali <soumyamurali(dot)work(at)gmail(dot)com> |
| Cc: | Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: [Patch]Add tab completion for DELETE ... USING |
| Date: | 2026-02-27 02:45:41 |
| Message-ID: | CAHGQGwE-kA193WNARjFPpKXqMKQ4nsK_+dBt4ADwFrtVteofaw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Feb 16, 2026 at 7:44 PM Soumya S Murali
<soumyamurali(dot)work(at)gmail(dot)com> wrote:
>
> Hi all,
>
> Thank you for the updated patch.
>
> On Mon, Feb 16, 2026 at 10:06 AM Tatsuya Kawata
> <kawatatatsuya0913(at)gmail(dot)com> wrote:
> >
> > Hi Kirill-san,
> >
> > Thank you for your review and for updating the CF entry status!
Since this patch is marked ready-for-committer, I've started reviewing it.
+ /* Complete DELETE FROM <table> USING with a list of tables */
+ else if (TailMatches("DELETE", "FROM", MatchAny, "USING"))
+ COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables);
Should this use Query_for_list_of_selectables instead of
Query_for_list_of_tables? The USING clause can reference not only tables
but also views and other selectable objects. The documentation also says
that USING follows the same syntax as the FROM clause of a SELECT.
+ /* Complete DELETE FROM <table> USING <table> */
+ else if (TailMatches("DELETE", "FROM", MatchAny, "USING", MatchAny))
+ COMPLETE_WITH("AS", "WHERE");
Since multiple objects can follow USING, showing only AS and WHERE immediately
after USING <table> feels a bit odd. Also, if we want to support this
completion here, shouldn't RETURNING also be included?
That said, since tab-completion for SELECT ... FROM ... does not suggest
anything at that point, I would also be fine with not suggesting anything for
DELETE ... USING ....
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-02-27 02:50:13 | Re: Unicode update and some tooling improvements |
| Previous Message | Tatsuo Ishii | 2026-02-27 02:37:33 | Re: Row pattern recognition |