ALTER TEXT SEARCH DICTIONARY tab completion

Started by Jeff Janesover 6 years ago3 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.

won't retrysuccessCI 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:t41996
psql -h localhost -U postgres

Built from patchset v3 (message #3), August 18, 2026 at 04:27 PM.

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 t41996_3 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 t41996_3 && git checkout t41996_3

Patchset v3 (message #3) is on t41996_3

Jump to latest
#1Jeff Janes
jeff.janes@gmail.com

"ALTER TEXT SEARCH DICTIONARY foobar" can be followed by an open
parenthesis, but that is not offered in tab completion. That is useful,
because otherwise I have to look up the docs to see if I need a SET or
OPTION(S) or WITH or something before it, just to discover I don't.

The attached one-line patch adds "(".

We can't go beyond that, as available options for each dictionary are not
known in advance.

Cheers,

Jeff

Attachments:

alter_dict_tab_complete.patchapplication/octet-stream; name=alter_dict_tab_complete.patchDownload+1-1
#2Georgios Kokolatos
gkokolatos@protonmail.com
In reply to: Jeff Janes (#1)
Re: ALTER TEXT SEARCH DICTIONARY tab completion

The following review has been posted through the commitfest application:
make installcheck-world: not tested
Implements feature: not tested
Spec compliant: not tested
Documentation: not tested

It looks good and does what it says on the tin.

One minor nitpick I feel I should add is that for completeness and
balance the equivalent `CREATE TEXT SEARCH DICTIONARY` should
get the same treatment.

Maybe something along the lines of:
-       else if (Matches("CREATE", "TEXT", "SEARCH", "CONFIGURATION", MatchAny))
+       else if (Matches("CREATE", "TEXT", "SEARCH", "DICTIONARY|CONFIGURATION", MatchAny))
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Georgios Kokolatos (#2)
Re: ALTER TEXT SEARCH DICTIONARY tab completion

Georgios Kokolatos <gkokolatos@pm.me> writes:

One minor nitpick I feel I should add is that for completeness and
balance the equivalent `CREATE TEXT SEARCH DICTIONARY` should
get the same treatment.

Maybe something along the lines of:
-       else if (Matches("CREATE", "TEXT", "SEARCH", "CONFIGURATION", MatchAny))
+       else if (Matches("CREATE", "TEXT", "SEARCH", "DICTIONARY|CONFIGURATION", MatchAny))

Agreed; actually all four CREATE TEXT SEARCH commands could do that.
I pushed it as attached.

regards, tom lane

Attachments:

t41996_3
alter_dict_tab_complete-2.patchtext/x-diff; charset=us-ascii; name=alter_dict_tab_complete-2.patchDownload+2-2