Hi Fujii-san, Soumya-san,

Thank you very much for reviewing and testing my patch!

> 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.

You're absolutely right. Since the USING clause follows the same syntax as
the FROM clause of a SELECT statement,
it should support views and other selectable objects, not just tables.
I've changed it to use Query_for_list_of_selectables.

> 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 ....

I agree with your second point. For consistency with SELECT ... FROM ...
completion behavior,
I think it's better not to suggest anything after USING <table>. This
approach is cleaner
and more consistent with existing patterns.

I've prepared a v4 patch with the following changes:
 - Use Query_for_list_of_selectables instead of Query_for_list_of_tables
 - Remove the completion for USING <table> to maintain consistency with
SELECT behavior

The updated v4 patch is attached.

Regards,
Tatsuya Kawata

Attachment: v4-0001-Add-tab-completion-for-DELETE-USING.patch
Description: Binary data

Reply via email to