| From: | Shubh Mehta <shubhmehta942(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | [PATCH] psql: Add tab completion for \dO, \dc and \det |
| Date: | 2026-11-29 22:06:25 |
| Message-ID: | CAP0=POUKfj2SySnZM1h3fCuN=xGvO5mg-w_ahGBsBycs4ekw+Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
When I press TAB after \dO, \dc or \det in psql, it shows table
names. That is not right. These commands are for collations,
conversions and foreign tables.
This happens because these three commands don't have their own rule
in tab-complete.in.c, so they use the "\d*" rule, which lists tables.
This patch adds a rule for each:
\dO -> collation names
\dc -> conversion names
\det -> foreign table names
For \dc I added a new Query_for_list_of_conversions. For the other
two I used the queries that were already there.
I also removed \dc from the TODO comment and added tests for all
three to the psql tab completion TAP test. All psql tests pass on
master for me.
Thanks,
Shubh Mehta
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-psql-Add-tab-completion-for-dO-dc-and-det.patch | text/x-patch | 4.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-11-29 22:44:45 | Time to get rid of YY_READ_BUF_SIZE |
| Previous Message | Alexander Korotkov | 2026-11-29 20:58:56 | Re: Asynchronous MergeAppend |