]> git.ipfire.org Git - thirdparty/postgresql.git/commit
psql: Add tab completion for DELETE ... USING.
authorFujii Masao <fujii@postgresql.org>
Mon, 2 Mar 2026 02:07:42 +0000 (11:07 +0900)
committerFujii Masao <fujii@postgresql.org>
Mon, 2 Mar 2026 02:07:42 +0000 (11:07 +0900)
commit0bf7d4ca9a6d0cd151de0209fd43671f158c1c88
tree5fef9d269077eab9f1ed309af2bd220a481e7a80
parent3b7a6fa1572000ffde0aa7dc951a1faf2f401618
psql: Add tab completion for DELETE ... USING.

This implements the tab completion that was marked as XXX TODO in the
source code. The following completion is now supported:

    DELETE FROM <table> USING <TAB> -> list of relations supporting SELECT

This uses Query_for_list_of_selectables (instead of Query_for_list_of_tables)
because the USING clause can reference not only tables but also views and
other selectable objects, following the same syntax as the FROM clause
of a SELECT statement.

Author: Tatsuya Kawata <kawatatatsuya0913@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Soumya S Murali <soumyamurali.work@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHza6qf0CLJuJr+5cQw0oWNebM5VyMB-ghoKBgnEjOQ_JtAiuw@mail.gmail.com
src/bin/psql/tab-complete.in.c