Re: [PATCH v1] Fix tab completion for REINDEX SYSTEM

From: Ishjaap Singh <ishjaap(dot)singh07(at)gmail(dot)com>
To: Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH v1] Fix tab completion for REINDEX SYSTEM
Date: 2026-10-26 10:28:46
Message-ID: CA+Y2Bmf=kOGoq9NSmx47r9=fCRFQGxyCprFUTWAwVPtwibVdLA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 23, 2026 at 13:39, Sho Ito wrote:
> psql currently offers `CONCURRENTLY` after `REINDEX SYSTEM`, although
> the backend rejects that combination [1].

Hi Sho,

I tested v1 on master (022a80fe6c1) with a readline build.

Before the patch, REINDEX SYSTEM <Tab><Tab> offers CONCURRENTLY, and
CON<Tab> completes to REINDEX SYSTEM CONCURRENTLY, which the server
rejects ("cannot reindex system catalogs concurrently").

With v1, REINDEX SYSTEM offers only database names, including with
parenthesized options and lowercase input, and CON<Tab> no longer
completes to CONCURRENTLY there. The DATABASE, TABLE, INDEX and SCHEMA
forms are unchanged. The psql TAP tests pass and pgindent is clean.

For backpatching: v1 applies as-is to REL_18 and REL_19, and to
REL_15-REL_17 once the file is renamed to tab-complete.c; REL_14 would
need a manual adjustment. These are applicability checks only; I
didn't build or test the stable branches.

Looks good to me.

Thanks,
Ishjaap Singh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message best xmg 2026-10-26 10:29:22 Re: Hash a ScalarArrayOpExpr whose array is fixed for one execution
Previous Message Hayato Kuroda (Fujitsu) 2026-10-26 09:48:32 RE: Incorrect CONTEXT reported for errors from parallel apply worker in logical replication