Improve tab completion for COPY
torikoshia <torikoshia@oss.nttdata.com>
From: torikoshia <torikoshia@oss.nttdata.com>
To: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2025-05-07T06:39:26Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix tab-completion for COPY and \copy options.
- f5a987c0e5f6 19 (unreleased) landed
- 765a4c94ccc8 18.0 landed
- c1c6169eb4f4 17.6 landed
- d69836b13c46 16.10 landed
- e3584e457db2 15.14 landed
- 0514616f0e28 14.19 landed
-
Add tab completion for REJECT_LIMIT option.
- b774ad493367 18.0 landed
-
Allow "COPY table TO" command to copy rows from materialized views.
- 534874fac0b3 18.0 cited
-
Add REJECT_LIMIT option to the COPY command.
- 4ac2a9beceb1 18.0 cited
Attachments
- v1-0001-Improve-tab-completion-for-COPY-WITH-options.patch (text/x-diff) patch v1-0001
Hi, I noticed that REJECT_LIMIT, an option available for COPY FROM, is not currently supported in psql's tab completion. Additionally, some options are only valid for COPY FROM or COPY TO, i.e. FREEZE, ON_ERROR, FORCE_QUOTE, but psql currently suggests them for both COPY FROM and COPY TO. As the number of COPY options continues to grow, I feel that having irrelevant suggestions makes tab completion noisier. Attached patch splits the tab completion rules between COPY FROM and COPY TO, so that only the appropriate options are suggested for each. What do you think? Regards, -- Atsushi Torikoshi Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.