> On Oct 19, 2026, at 11:02, Sho Ito <[email protected]> wrote:
>
> Hi,
>
> psql currently offers `CASCADE` after `DROP INDEX CONCURRENTLY <index_name>`,
> although the backend rejects that combination [1].
>
> The attached patch limits completion to `RESTRICT` for concurrent index
> drops. Ordinary `DROP INDEX` continues to offer both `CASCADE` and `RESTRICT`.
>
> [1]
> https://github.com/postgres/postgres/blob/3138f248cd3de43dd0f96760fc666152ea8a5c37/src/backend/commands/tablecmds.c#L1590-L1593
>
> Kind regards,
> Sho Ito
>
> --
> =======================================
> Sho Ito (Sean)
>
> E-mail: [email protected]
> LinkedIn: https://www.linkedin.com/in/sho-ito-0628/
> GitHub: https://github.com/sean0628/
> =======================================
> <v1-0001-Fix-tab-completion-for-DROP-INDEX-CONCURRENTLY.patch>
Good catch.
```
evantest=# DROP INDEX CONCURRENTLY i
CASCADE RESTRICT
evantest=# DROP INDEX CONCURRENTLY i cascade;
ERROR: DROP INDEX CONCURRENTLY does not support CASCADE
```
The fix looks good to me. I also verified that it only removes “CASCADE” from
“DROP INDEX CONCURRENTLY”, while “DROP INDEX” is not affected.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/