]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix tab-completion for COPY and \copy options.
authorMasahiko Sawada <msawada@postgresql.org>
Wed, 9 Jul 2025 12:45:31 +0000 (05:45 -0700)
committerMasahiko Sawada <msawada@postgresql.org>
Wed, 9 Jul 2025 12:45:31 +0000 (05:45 -0700)
commit765a4c94ccc83ab95cf2d721e1ff97ba173c83e7
treec6668561714d7ff455335a3b87800280f69e974f
parent5d9e675b36b5c8ca0b2b03c2194f034b4820d4d5
Fix tab-completion for COPY and \copy options.

Commit c273d9d8ce4 reworked tab-completion of COPY and \copy in psql
and added support for completing options within WITH clauses. However,
the same COPY options were suggested for both COPY TO and COPY FROM
commands, even though some options are only valid for one or the
other.

This commit separates the COPY options for COPY FROM and COPY TO
commands to provide more accurate auto-completion suggestions.

Back-patch to v14 where tab-completion for COPY and \copy options
within WITH clauses was first supported.

Author: Atsushi Torikoshi <torikoshia@oss.nttdata.com>
Reviewed-by: Yugo Nagata <nagata@sraoss.co.jp>
Discussion: https://postgr.es/m/079e7a2c801f252ae8d522b772790ed7@oss.nttdata.com
Backpatch-through: 14
src/bin/psql/tab-complete.in.c