remove VersionedQuery support from psql tab completion
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.
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:t248722psql -h localhost -U postgresBuilt from patchset v1 (message #1), September 07, 2026 at 05:56 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 t248722_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t248722_1 && git checkout t248722_1Patchset v1 (message #1) is on t248722_1
This infrastructure was added by commit 722408bcd1 and was only ever used
for publications and subscriptions. Since we just bumped psql's minimum
supported version to v10, it's no longer used by anything. Furthermore, a
quick glance indicates there's nothing else that should use it. So, IMHO
we might as well remove it.
--
nathan
Hi,
On Fri, 3 Jul 2026 at 00:21, Nathan Bossart <nathandbossart@gmail.com>
wrote:
This infrastructure was added by commit 722408bcd1 and was only ever used
for publications and subscriptions. Since we just bumped psql's minimum
supported version to v10, it's no longer used by anything. Furthermore, a
quick glance indicates there's nothing else that should use it. So, IMHO
we might as well remove it.
Thanks for the patch!
Doing a grep on VersionedQuery I could find one instance missing
in your patch in 010_tab_completion.pl file there's a test block
# check VersionedQuery infrastructure
check_completion(
"DROP PUBLIC\t \t\t",
qr/DROP PUBLICATION\s+some_publication /,
"check VersionedQuery");
I think the test case is fine, but the comment + label needs to be
updated or case drop if it's redundant.
Rest, LGTM.
Regards,
Ayush
Nathan Bossart <nathandbossart@gmail.com> writes:
This infrastructure was added by commit 722408bcd1 and was only ever used
for publications and subscriptions. Since we just bumped psql's minimum
supported version to v10, it's no longer used by anything. Furthermore, a
quick glance indicates there's nothing else that should use it. So, IMHO
we might as well remove it.
This seems a little short-sighted. Do you think we'll never again
make any catalog changes that affect tab completion? Admittedly,
maybe all such cases will fall under what SchemaQuery is good for.
But that's significantly harder to use, so I'm not really in a
hurry to make that tradeoff.
regards, tom lane
On Thu, Jul 02, 2026 at 06:17:38PM -0400, Tom Lane wrote:
Nathan Bossart <nathandbossart@gmail.com> writes:
This infrastructure was added by commit 722408bcd1 and was only ever used
for publications and subscriptions. Since we just bumped psql's minimum
supported version to v10, it's no longer used by anything. Furthermore, a
quick glance indicates there's nothing else that should use it. So, IMHO
we might as well remove it.This seems a little short-sighted. Do you think we'll never again
make any catalog changes that affect tab completion? Admittedly,
maybe all such cases will fall under what SchemaQuery is good for.
But that's significantly harder to use, so I'm not really in a
hurry to make that tradeoff.
That's what I thought at first, but given we didn't accumulate any other
uses in the ~8 years it was around, I think there's a reasonably good
chance it goes unused for quite a while longer. This was just a small bit
of cleanup; I'm fine with leaving it around if you want.
--
nathan