Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix tab-completion for COPY and \copy options.

  2. Add tab completion for REJECT_LIMIT option.

  3. Allow "COPY table TO" command to copy rows from materialized views.

  4. Add REJECT_LIMIT option to the COPY command.

  1. Improve tab completion for COPY

    torikoshia <torikoshia@oss.nttdata.com> — 2025-05-07T06:39:26Z

    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.
  2. Re: Improve tab completion for COPY

    Yugo Nagata <nagata@sraoss.co.jp> — 2025-05-07T13:23:18Z

    On Wed, 7 May 2025 15:39:26 +0900
    torikoshia <torikoshia@oss.nttdata.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@sraoss.co.jp>
    
    
    
    
  3. Re: Improve tab completion for COPY

    Masahiko Sawada <sawada.mshk@gmail.com> — 2025-05-07T21:36:35Z

    On Wed, May 7, 2025 at 6:23 AM Yugo Nagata <nagata@sraoss.co.jp> wrote:
    >
    > On Wed, 7 May 2025 15:39:26 +0900
    > torikoshia <torikoshia@oss.nttdata.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,
    
    +1
    
    > 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.
    
    Or we can simply #define the common option list and #define two lists
    for COPY TO and COPY FROM by concatenating the common option list,
    like we do for ALTER PROCEDURE/ROUTINE/FUNCTION options.
    
    Regards,
    
    -- 
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com
    
    
    
    
  4. Re: Improve tab completion for COPY

    Yugo Nagata <nagata@sraoss.co.jp> — 2025-05-07T23:53:35Z

    On Wed, 7 May 2025 14:36:35 -0700
    Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    
    > On Wed, May 7, 2025 at 6:23 AM Yugo Nagata <nagata@sraoss.co.jp> wrote:
    > >
    > > On Wed, 7 May 2025 15:39:26 +0900
    > > torikoshia <torikoshia@oss.nttdata.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,
    > 
    > +1
    > 
    > > 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.
    > 
    > Or we can simply #define the common option list and #define two lists
    > for COPY TO and COPY FROM by concatenating the common option list,
    > like we do for ALTER PROCEDURE/ROUTINE/FUNCTION options.
    
    +1
    
    I overlooked this although I looked for an existing solution in the tab
    complement codes.
    
    Regards,
    Yugo Nagata
    
    > 
    > Regards,
    > 
    > -- 
    > Masahiko Sawada
    > Amazon Web Services: https://aws.amazon.com
    
    
    -- 
    Yugo Nagata <nagata@sraoss.co.jp>
    
    
    
    
  5. Re: Improve tab completion for COPY

    torikoshia <torikoshia@oss.nttdata.com> — 2025-05-08T12:39:10Z

    Thanks for your comments!
    
    On 2025-05-08 08:53, Yugo Nagata wrote:
    > On Wed, 7 May 2025 14:36:35 -0700
    > Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    > 
    >> On Wed, May 7, 2025 at 6:23 AM Yugo Nagata <nagata@sraoss.co.jp> 
    >> wrote:
    >> >
    >> > On Wed, 7 May 2025 15:39:26 +0900
    >> > torikoshia <torikoshia@oss.nttdata.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,
    >> 
    >> +1
    >> 
    >> > 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.
    >> 
    >> Or we can simply #define the common option list and #define two lists
    >> for COPY TO and COPY FROM by concatenating the common option list,
    >> like we do for ALTER PROCEDURE/ROUTINE/FUNCTION options.
    > 
    > +1
    
    Agreed.
    I think attached patch implemented the suggested way.
    
    -- 
    Regards,
    
    --
    Atsushi Torikoshi
    Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.
  6. Re: Improve tab completion for COPY

    Yugo Nagata <nagata@sraoss.co.jp> — 2025-06-03T08:58:01Z

    On Thu, 8 May 2025 21:39:10 +0900
    torikoshia <torikoshia@oss.nttdata.com> wrote:
    
    > Thanks for your comments!
    > 
    > On 2025-05-08 08:53, Yugo Nagata wrote:
    > > On Wed, 7 May 2025 14:36:35 -0700
    > > Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    > > 
    > >> On Wed, May 7, 2025 at 6:23 AM Yugo Nagata <nagata@sraoss.co.jp> 
    > >> wrote:
    > >> >
    > >> > On Wed, 7 May 2025 15:39:26 +0900
    > >> > torikoshia <torikoshia@oss.nttdata.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,
    > >> 
    > >> +1
    > >> 
    > >> > 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.
    > >> 
    > >> Or we can simply #define the common option list and #define two lists
    > >> for COPY TO and COPY FROM by concatenating the common option list,
    > >> like we do for ALTER PROCEDURE/ROUTINE/FUNCTION options.
    > > 
    > > +1
    > 
    > Agreed.
    > I think attached patch implemented the suggested way.
    
    Thank you for updating the patch.
    It looks good and I confirmed that this works as expected.
    
    Regards,
    Yugo Nagata
    
    > 
    > -- 
    > Regards,
    > 
    > --
    > Atsushi Torikoshi
    > Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.
    
    
    -- 
    Yugo Nagata <nagata@sraoss.co.jp>
    
    
    
    
  7. Re: Improve tab completion for COPY

    torikoshia <torikoshia@oss.nttdata.com> — 2025-06-10T02:15:09Z

    On 2025-06-03 17:58, Yugo Nagata wrote:
    > Thank you for updating the patch.
    > It looks good and I confirmed that this works as expected.
    
    Thanks for your review!
    
    BTW this is a small patch, but it does two things:
    
    (1) adds tab completion support for the REJECT_LIMIT option, which was 
    introduced in v18
    (2) splits the tab completion logic between COPY FROM and COPY TO to 
    reflect their different options.
    
    While maybe (2) should be postponed to v19 or later, I think it would be 
    better to include (1) in v18.
    So I’ve split them into separate patches accordingly.
    
    
    --
    Atsushi Torikoshi
    Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.
  8. Re: Improve tab completion for COPY

    Yugo Nagata <nagata@sraoss.co.jp> — 2025-06-10T02:59:54Z

    On Tue, 10 Jun 2025 11:15:09 +0900
    torikoshia <torikoshia@oss.nttdata.com> wrote:
    
    > On 2025-06-03 17:58, Yugo Nagata wrote:
    > > Thank you for updating the patch.
    > > It looks good and I confirmed that this works as expected.
    > 
    > Thanks for your review!
    > 
    > BTW this is a small patch, but it does two things:
    > 
    > (1) adds tab completion support for the REJECT_LIMIT option, which was 
    > introduced in v18
    > (2) splits the tab completion logic between COPY FROM and COPY TO to 
    > reflect their different options.
    > 
    > While maybe (2) should be postponed to v19 or later, I think it would be 
    > better to include (1) in v18.
    > So I’ve split them into separate patches accordingly.
    
    I am not convinced whether (1) should be regarded as a v18-related oversight
    or a new feature, but if this is a oversight, this should be added to the open
    items list?
    
    https://wiki.postgresql.org/wiki/PostgreSQL_18_Open_Items
    
    Regards,
    Yugo Nagata
    
    -- 
    Yugo Nagata <nagata@sraoss.co.jp>
    
    
    
    
  9. Re: Improve tab completion for COPY

    Masahiko Sawada <sawada.mshk@gmail.com> — 2025-06-10T19:37:48Z

    On Mon, Jun 9, 2025 at 7:59 PM Yugo Nagata <nagata@sraoss.co.jp> wrote:
    >
    > On Tue, 10 Jun 2025 11:15:09 +0900
    > torikoshia <torikoshia@oss.nttdata.com> wrote:
    >
    > > On 2025-06-03 17:58, Yugo Nagata wrote:
    > > > Thank you for updating the patch.
    > > > It looks good and I confirmed that this works as expected.
    > >
    > > Thanks for your review!
    > >
    > > BTW this is a small patch, but it does two things:
    > >
    > > (1) adds tab completion support for the REJECT_LIMIT option, which was
    > > introduced in v18
    > > (2) splits the tab completion logic between COPY FROM and COPY TO to
    > > reflect their different options.
    > >
    > > While maybe (2) should be postponed to v19 or later, I think it would be
    > > better to include (1) in v18.
    > > So I’ve split them into separate patches accordingly.
    >
    > I am not convinced whether (1) should be regarded as a v18-related oversight
    > or a new feature, but if this is a oversight, this should be added to the open
    > items list?
    
    Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    oversight of this feature, but I also agree that it's not a bug and
    doesn't block the release.
    
    How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    
    Regards,
    
    --
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com
    
    
    
    
  10. Re: Improve tab completion for COPY

    Nathan Bossart <nathandbossart@gmail.com> — 2025-06-10T20:33:01Z

    On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    >> > (1) adds tab completion support for the REJECT_LIMIT option, which was
    >> > introduced in v18
    >> > (2) splits the tab completion logic between COPY FROM and COPY TO to
    >> > reflect their different options.
    >
    > [...]
    > 
    > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    > oversight of this feature, but I also agree that it's not a bug and
    > doesn't block the release.
    > 
    > How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    
    0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    argued that we should fix tab completion for unlogged partitioned tables in
    v18 [0], and this seems pretty similar.
    
    TBH I'd even say that 0002 is fixing a bug and could be back-patched.  I've
    added rmt@ here in case Tomas or Heikki feel differently.
    
    [0] https://postgr.es/m/aEH4XYwrlyvjZUvE%40nathan
    
    -- 
    nathan
    
    
    
    
  11. Re: Improve tab completion for COPY

    Fujii Masao <masao.fujii@oss.nttdata.com> — 2025-06-10T23:56:48Z

    
    On 2025/06/11 5:33, Nathan Bossart wrote:
    > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    >>>> (1) adds tab completion support for the REJECT_LIMIT option, which was
    >>>> introduced in v18
    >>>> (2) splits the tab completion logic between COPY FROM and COPY TO to
    >>>> reflect their different options.
    >>
    >> [...]
    >>
    >> Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    >> oversight of this feature, but I also agree that it's not a bug and
    >> doesn't block the release.
    >>
    >> How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    > 
    > 0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    > argued that we should fix tab completion for unlogged partitioned tables in
    > v18 [0], and this seems pretty similar.
    
    BTW, I also have a similar patch [1] in my queue that I'm planning to commit.
    Materialized views have been allowed in COPY TO since v18 (commit 534874fac0b),
    and that patch improves tab completion to include them. For the same reason
    discussed here, it might make sense to commit that patch in v18 as well.
    
    Regards,
    
    [1] https://postgr.es/m/CACJufxFxnSkikp+GormAGHcMTX1YH2HRXW1+3dJM9w7yY9hdsg@mail.gmail.com
    
    -- 
    Fujii Masao
    NTT DATA Japan Corporation
    
    
    
    
    
  12. Re: Improve tab completion for COPY

    Masahiko Sawada <sawada.mshk@gmail.com> — 2025-06-11T18:47:01Z

    On Tue, Jun 10, 2025 at 1:33 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
    >
    > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    > >> > (1) adds tab completion support for the REJECT_LIMIT option, which was
    > >> > introduced in v18
    > >> > (2) splits the tab completion logic between COPY FROM and COPY TO to
    > >> > reflect their different options.
    > >
    > > [...]
    > >
    > > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    > > oversight of this feature, but I also agree that it's not a bug and
    > > doesn't block the release.
    > >
    > > How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    >
    > 0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    > argued that we should fix tab completion for unlogged partitioned tables in
    > v18 [0], and this seems pretty similar.
    >
    >
    > TBH I'd even say that 0002 is fixing a bug and could be back-patched.  I've
    > added rmt@ here in case Tomas or Heikki feel differently.
    
    Thank you for your confirmation. I've just pushed the change (1) and
    am waiting for more comments on the change (2).
    
    Regards,
    
    -- 
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com
    
    
    
    
  13. Re: Improve tab completion for COPY

    Masahiko Sawada <sawada.mshk@gmail.com> — 2025-07-01T05:20:45Z

    On Thu, Jun 12, 2025 at 3:47 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    >
    > On Tue, Jun 10, 2025 at 1:33 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
    > >
    > > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    > > >> > (1) adds tab completion support for the REJECT_LIMIT option, which was
    > > >> > introduced in v18
    > > >> > (2) splits the tab completion logic between COPY FROM and COPY TO to
    > > >> > reflect their different options.
    > > >
    > > > [...]
    > > >
    > > > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    > > > oversight of this feature, but I also agree that it's not a bug and
    > > > doesn't block the release.
    > > >
    > > > How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    > >
    > > 0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    > > argued that we should fix tab completion for unlogged partitioned tables in
    > > v18 [0], and this seems pretty similar.
    > >
    > >
    > > TBH I'd even say that 0002 is fixing a bug and could be back-patched.  I've
    > > added rmt@ here in case Tomas or Heikki feel differently.
    >
    > Thank you for your confirmation. I've just pushed the change (1) and
    > am waiting for more comments on the change (2).
    >
    
    Thinking of the 0002 patch, I'm also inclined to agree that this fixes
    a bogus tab completion behavior for COPY command and can be
    back-patched to v14. In v14, c273d9d8ce reworked the tab completion
    for COPY command and supports the completion for the options of FORMAT
    within a WITH clause so we cannot back-patch it to v13.
    
    Torikoshi-san, could you please prepare the patch for other branches
    too if you agree with this direction?
    
    Regards,
    
    -- 
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com
    
    
    
    
  14. Re: Improve tab completion for COPY

    torikoshia <torikoshia@oss.nttdata.com> — 2025-07-02T05:46:34Z

    On 2025-07-01 14:20, Masahiko Sawada wrote:
    > On Thu, Jun 12, 2025 at 3:47 AM Masahiko Sawada <sawada.mshk@gmail.com> 
    > wrote:
    >> 
    >> On Tue, Jun 10, 2025 at 1:33 PM Nathan Bossart 
    >> <nathandbossart@gmail.com> wrote:
    >> >
    >> > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    >> > >> > (1) adds tab completion support for the REJECT_LIMIT option, which was
    >> > >> > introduced in v18
    >> > >> > (2) splits the tab completion logic between COPY FROM and COPY TO to
    >> > >> > reflect their different options.
    >> > >
    >> > > [...]
    >> > >
    >> > > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    >> > > oversight of this feature, but I also agree that it's not a bug and
    >> > > doesn't block the release.
    >> > >
    >> > > How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    >> >
    >> > 0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    >> > argued that we should fix tab completion for unlogged partitioned tables in
    >> > v18 [0], and this seems pretty similar.
    >> >
    >> >
    >> > TBH I'd even say that 0002 is fixing a bug and could be back-patched.  I've
    >> > added rmt@ here in case Tomas or Heikki feel differently.
    >> 
    >> Thank you for your confirmation. I've just pushed the change (1) and
    >> am waiting for more comments on the change (2).
    >> 
    > 
    > Thinking of the 0002 patch, I'm also inclined to agree that this fixes
    > a bogus tab completion behavior for COPY command and can be
    > back-patched to v14. In v14, c273d9d8ce reworked the tab completion
    > for COPY command and supports the completion for the options of FORMAT
    > within a WITH clause so we cannot back-patch it to v13.
    
    Agreed.
    
    > Torikoshi-san, could you please prepare the patch for other branches
    > too if you agree with this direction?
    
    Sure! Attached patches.
    
    -- 
    Regards,
    
    --
    Atsushi Torikoshi
    Seconded from NTT DATA Japan Corporation to SRA OSS K.K.
  15. Re: Improve tab completion for COPY

    Masahiko Sawada <sawada.mshk@gmail.com> — 2025-07-03T02:37:11Z

    On Wed, Jul 2, 2025 at 2:46 PM torikoshia <torikoshia@oss.nttdata.com> wrote:
    >
    > On 2025-07-01 14:20, Masahiko Sawada wrote:
    > > On Thu, Jun 12, 2025 at 3:47 AM Masahiko Sawada <sawada.mshk@gmail.com>
    > > wrote:
    > >>
    > >> On Tue, Jun 10, 2025 at 1:33 PM Nathan Bossart
    > >> <nathandbossart@gmail.com> wrote:
    > >> >
    > >> > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    > >> > >> > (1) adds tab completion support for the REJECT_LIMIT option, which was
    > >> > >> > introduced in v18
    > >> > >> > (2) splits the tab completion logic between COPY FROM and COPY TO to
    > >> > >> > reflect their different options.
    > >> > >
    > >> > > [...]
    > >> > >
    > >> > > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    > >> > > oversight of this feature, but I also agree that it's not a bug and
    > >> > > doesn't block the release.
    > >> > >
    > >> > > How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    > >> >
    > >> > 0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    > >> > argued that we should fix tab completion for unlogged partitioned tables in
    > >> > v18 [0], and this seems pretty similar.
    > >> >
    > >> >
    > >> > TBH I'd even say that 0002 is fixing a bug and could be back-patched.  I've
    > >> > added rmt@ here in case Tomas or Heikki feel differently.
    > >>
    > >> Thank you for your confirmation. I've just pushed the change (1) and
    > >> am waiting for more comments on the change (2).
    > >>
    > >
    > > Thinking of the 0002 patch, I'm also inclined to agree that this fixes
    > > a bogus tab completion behavior for COPY command and can be
    > > back-patched to v14. In v14, c273d9d8ce reworked the tab completion
    > > for COPY command and supports the completion for the options of FORMAT
    > > within a WITH clause so we cannot back-patch it to v13.
    >
    > Agreed.
    >
    > > Torikoshi-san, could you please prepare the patch for other branches
    > > too if you agree with this direction?
    >
    > Sure! Attached patches.
    
    Thank you for updating the patches! The patches mostly look good to
    me. As for v3-0002-Improve-tab-completion-for-COPY-options_v17.patch,
    please note that we don't support REJECT_LIMIT in v17:
    
    +/* COPY FROM options */
    +#define Copy_from_options \
    +Copy_common_options, "DEFAULT", "FORCE_NOT_NULL", "FORCE_NULL", "FREEZE", \
    +"LOG_VERBOSITY", "ON_ERROR", "REJECT_LIMIT"
    
    I've attached the updated patches that addressed the above issue and
    updated the commit messages. Please review them.
    
    Regards,
    
    -- 
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com
    
  16. Re: Improve tab completion for COPY

    torikoshia <torikoshia@oss.nttdata.com> — 2025-07-03T13:30:34Z

    On 2025-07-03 11:37, Masahiko Sawada wrote:
    > On Wed, Jul 2, 2025 at 2:46 PM torikoshia <torikoshia@oss.nttdata.com> 
    > wrote:
    >> 
    >> On 2025-07-01 14:20, Masahiko Sawada wrote:
    >> > On Thu, Jun 12, 2025 at 3:47 AM Masahiko Sawada <sawada.mshk@gmail.com>
    >> > wrote:
    >> >>
    >> >> On Tue, Jun 10, 2025 at 1:33 PM Nathan Bossart
    >> >> <nathandbossart@gmail.com> wrote:
    >> >> >
    >> >> > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    >> >> > >> > (1) adds tab completion support for the REJECT_LIMIT option, which was
    >> >> > >> > introduced in v18
    >> >> > >> > (2) splits the tab completion logic between COPY FROM and COPY TO to
    >> >> > >> > reflect their different options.
    >> >> > >
    >> >> > > [...]
    >> >> > >
    >> >> > > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    >> >> > > oversight of this feature, but I also agree that it's not a bug and
    >> >> > > doesn't block the release.
    >> >> > >
    >> >> > > How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    >> >> >
    >> >> > 0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    >> >> > argued that we should fix tab completion for unlogged partitioned tables in
    >> >> > v18 [0], and this seems pretty similar.
    >> >> >
    >> >> >
    >> >> > TBH I'd even say that 0002 is fixing a bug and could be back-patched.  I've
    >> >> > added rmt@ here in case Tomas or Heikki feel differently.
    >> >>
    >> >> Thank you for your confirmation. I've just pushed the change (1) and
    >> >> am waiting for more comments on the change (2).
    >> >>
    >> >
    >> > Thinking of the 0002 patch, I'm also inclined to agree that this fixes
    >> > a bogus tab completion behavior for COPY command and can be
    >> > back-patched to v14. In v14, c273d9d8ce reworked the tab completion
    >> > for COPY command and supports the completion for the options of FORMAT
    >> > within a WITH clause so we cannot back-patch it to v13.
    >> 
    >> Agreed.
    >> 
    >> > Torikoshi-san, could you please prepare the patch for other branches
    >> > too if you agree with this direction?
    >> 
    >> Sure! Attached patches.
    > 
    > Thank you for updating the patches! The patches mostly look good to
    > me. As for v3-0002-Improve-tab-completion-for-COPY-options_v17.patch,
    > please note that we don't support REJECT_LIMIT in v17:
    > 
    > +/* COPY FROM options */
    > +#define Copy_from_options \
    > +Copy_common_options, "DEFAULT", "FORCE_NOT_NULL", "FORCE_NULL", 
    > "FREEZE", \
    > +"LOG_VERBOSITY", "ON_ERROR", "REJECT_LIMIT"
    
    Thanks for your check and correction!
    
    > I've attached the updated patches that addressed the above issue and
    > updated the commit messages. Please review them.
    
    Other than the fix you mentioned, the changes are the same as in the 
    v3-0002 patches.
    I didn’t find any particular issues.
    
    > Regards,
    
    -- 
    Regards,
    
    --
    Atsushi Torikoshi
    Seconded from NTT DATA Japan Corporation to SRA OSS K.K.
    
    
    
    
  17. Re: Improve tab completion for COPY

    Masahiko Sawada <sawada.mshk@gmail.com> — 2025-07-09T13:08:51Z

    On Thu, Jul 3, 2025 at 10:30 PM torikoshia <torikoshia@oss.nttdata.com> wrote:
    >
    > On 2025-07-03 11:37, Masahiko Sawada wrote:
    > > On Wed, Jul 2, 2025 at 2:46 PM torikoshia <torikoshia@oss.nttdata.com>
    > > wrote:
    > >>
    > >> On 2025-07-01 14:20, Masahiko Sawada wrote:
    > >> > On Thu, Jun 12, 2025 at 3:47 AM Masahiko Sawada <sawada.mshk@gmail.com>
    > >> > wrote:
    > >> >>
    > >> >> On Tue, Jun 10, 2025 at 1:33 PM Nathan Bossart
    > >> >> <nathandbossart@gmail.com> wrote:
    > >> >> >
    > >> >> > On Tue, Jun 10, 2025 at 12:37:48PM -0700, Masahiko Sawada wrote:
    > >> >> > >> > (1) adds tab completion support for the REJECT_LIMIT option, which was
    > >> >> > >> > introduced in v18
    > >> >> > >> > (2) splits the tab completion logic between COPY FROM and COPY TO to
    > >> >> > >> > reflect their different options.
    > >> >> > >
    > >> >> > > [...]
    > >> >> > >
    > >> >> > > Given REJECT_LIMIT is a new v18 feature, it seems to me that (1) is an
    > >> >> > > oversight of this feature, but I also agree that it's not a bug and
    > >> >> > > doesn't block the release.
    > >> >> > >
    > >> >> > > How does the RMT feel about the change (1)?  Nathan, would you be OK with that?
    > >> >> >
    > >> >> > 0001 sure seems like an oversight in commit 4ac2a9b to me.  In any case, I
    > >> >> > argued that we should fix tab completion for unlogged partitioned tables in
    > >> >> > v18 [0], and this seems pretty similar.
    > >> >> >
    > >> >> >
    > >> >> > TBH I'd even say that 0002 is fixing a bug and could be back-patched.  I've
    > >> >> > added rmt@ here in case Tomas or Heikki feel differently.
    > >> >>
    > >> >> Thank you for your confirmation. I've just pushed the change (1) and
    > >> >> am waiting for more comments on the change (2).
    > >> >>
    > >> >
    > >> > Thinking of the 0002 patch, I'm also inclined to agree that this fixes
    > >> > a bogus tab completion behavior for COPY command and can be
    > >> > back-patched to v14. In v14, c273d9d8ce reworked the tab completion
    > >> > for COPY command and supports the completion for the options of FORMAT
    > >> > within a WITH clause so we cannot back-patch it to v13.
    > >>
    > >> Agreed.
    > >>
    > >> > Torikoshi-san, could you please prepare the patch for other branches
    > >> > too if you agree with this direction?
    > >>
    > >> Sure! Attached patches.
    > >
    > > Thank you for updating the patches! The patches mostly look good to
    > > me. As for v3-0002-Improve-tab-completion-for-COPY-options_v17.patch,
    > > please note that we don't support REJECT_LIMIT in v17:
    > >
    > > +/* COPY FROM options */
    > > +#define Copy_from_options \
    > > +Copy_common_options, "DEFAULT", "FORCE_NOT_NULL", "FORCE_NULL",
    > > "FREEZE", \
    > > +"LOG_VERBOSITY", "ON_ERROR", "REJECT_LIMIT"
    >
    > Thanks for your check and correction!
    >
    > > I've attached the updated patches that addressed the above issue and
    > > updated the commit messages. Please review them.
    >
    > Other than the fix you mentioned, the changes are the same as in the
    > v3-0002 patches.
    > I didn’t find any particular issues.
    >
    
    Thank you for reviewing the patches. I've just pushed the fix.
    
    Regards,
    
    --
    Masahiko Sawada
    Amazon Web Services: https://aws.amazon.com
    
    
    
    
  18. Re: Improve tab completion for COPY

    Atsushi Torikoshi <torikoshia.tech@gmail.com> — 2025-07-12T06:53:14Z

    On Wed, Jul 9, 2025 at 10:09 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
    
    > Thank you for reviewing the patches. I've just pushed the fix.
    
    Thanks for pushing them!