On Mon, Feb 16, 2026 at 7:44 PM Soumya S Murali
<[email protected]> wrote:
>
> Hi all,
>
> Thank you for the updated patch.
>
> On Mon, Feb 16, 2026 at 10:06 AM Tatsuya Kawata
> <[email protected]> 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


Reply via email to