[PATCH v1] Fix tab completion for concurrent materialized view refresh

Started by Sho Ito10 days ago2 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

appliessuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t254171
psql -h localhost -U postgres

Built from patchset v1 (message #1), October 22, 2026 at 06:11 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t254171_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t254171_1 && git checkout t254171_1

Patchset v1 (message #1) is on t254171_1

Jump to latest
#1Sho Ito
i.sho.0628@gmail.com

Hi,

psql currently suggests `WITH NO DATA` for
`REFRESH MATERIALIZED VIEW CONCURRENTLY`, although the backend rejects
that combination [1]https://github.com/postgres/postgres/blob/8e82d6610e7280d7870c0c36ff1c797e3cfb3e09/src/backend/commands/matview.c#L209-L214.

The attached patch offers only `DATA` after concurrent `WITH` and removes
`DATA` completion after a manually entered concurrent `WITH NO`.
Nonconcurrent refresh completion remains unchanged.

[1]: https://github.com/postgres/postgres/blob/8e82d6610e7280d7870c0c36ff1c797e3cfb3e09/src/backend/commands/matview.c#L209-L214
https://github.com/postgres/postgres/blob/8e82d6610e7280d7870c0c36ff1c797e3cfb3e09/src/backend/commands/matview.c#L209-L214

Kind regards,
Sho Ito

--
=======================================
*Sho Ito (Sean)*

E-mail: i.sho.0628@gmail.com
LinkedIn: *https://www.linkedin.com/in/sho-ito-0628/
<https://www.linkedin.com/in/sho-ito-0628/&gt;*
GitHub: https://github.com/sean0628/
=======================================

Attachments:

t254171_1
v1-0001-Fix-tab-completion-for-concurrent-materialized-vi.patchapplication/octet-stream; name=v1-0001-Fix-tab-completion-for-concurrent-materialized-vi.patchDownload+1-4
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Sho Ito (#1)
Re: [PATCH v1] Fix tab completion for concurrent materialized view refresh

On 13 Oct 2026, at 05:54, Sho Ito <i.sho.0628@gmail.com> wrote:

psql currently suggests `WITH NO DATA` for
`REFRESH MATERIALIZED VIEW CONCURRENTLY`, although the backend rejects
that combination [1].

Good find, that's indeed incorrect.

The attached patch offers only `DATA` after concurrent `WITH` and removes
`DATA` completion after a manually entered concurrent `WITH NO`.
Nonconcurrent refresh completion remains unchanged.

Thanks, I will apply this with a backpatch all the way down to 14.

--
Daniel Gustafsson