From: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> |
---|---|
To: | torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Improve tab completion for COPY |
Date: | 2025-05-07 13:23:18 |
Message-ID: | 20250507222318.421a6b6bfc311f4cdf07ebc0@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 7 May 2025 15:39:26 +0900
torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> wrote:
> 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.
Indeed eliminating irrelevant suggestions would improve user experience,
but I think there is a drawback that it increases code maintenance for
adding options used both in COPY FROM and TO. This might be trivial until
the number of common options are small as now, though.
Perhaps, the redundant code could be reduced by preparing a list (an array
of const char*) containing common options part, then appending options
specific to each mode using some function like kind of append_variable_names,
and passing these lists to COMPLETE_WITH_LIST.
Regards,
Yugo Nagata
> 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.
--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
From | Date | Subject | |
---|---|---|---|
Next Message | Shayon Mukherjee | 2025-05-07 13:33:25 | Re: Prolonged truncation phase during vacuum on toast table with repeated interruptions by lock waiters and a proposed POC patch |
Previous Message | Aleksander Alekseev | 2025-05-07 13:15:10 | Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X |