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

Tatsuya Kawata <kawatatatsuya0913@gmail.com>

From: Tatsuya Kawata <kawatatatsuya0913@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2025-12-25T15:51:54Z
Lists: pgsql-hackers

Attachments

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