Hi When using psql help with SQL commands, I found an inconsistency tab-completion for command "DELETE" as follows.
=# \h de[TAB] deallocate declare delete from =# \help[TAB] ABORT CLUSTER DELETE FROM =# \help[ENTER] Available help: ... ANALYZE CREATE OPERATOR CLASS DELETE ... =# \h delete Command: DELETE Description: delete rows of a table ... You see, the tab-completion for "DELETE" is "DELETE FROM" which is not same as help-command said(which is "DELETE"). I tried to figure out why "FROM" is introduced here, but no good result got. In [1] someone changed "DELETE" to "DELETE FROM" but no reason added. IMO, the "FROM" is unnecessary just like "INTO" for "INSERT" command. So I tried to fix the inconsistency by removing "FROM" from "DELETE FROM" in tab-complete.c. Please see the attached patch. Any comment or different thought is very welcome. [1] https://github.com/postgres/postgres/commit/4c1f9a0f0bb41c31b26bb88ba8c5d3fca4521dd7 Regards, Tang
0001-Remove-FROM-in-DELETE-FROM.patch
Description: 0001-Remove-FROM-in-DELETE-FROM.patch