Skip to content

Commit 707195c

Browse files
committed
Allow psql \d tab completion to complete all relation kinds
This matches what \d actually accepts.
1 parent da023ac commit 707195c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/psql/tab-complete.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,11 @@ static const SchemaQuery Query_for_list_of_updatables = {
369369
NULL
370370
};
371371

372-
static const SchemaQuery Query_for_list_of_tisvf = {
372+
static const SchemaQuery Query_for_list_of_relations = {
373373
/* catname */
374374
"pg_catalog.pg_class c",
375375
/* selcondition */
376-
"c.relkind IN ('r', 'i', 'S', 'v', 'f')",
376+
NULL,
377377
/* viscondition */
378378
"pg_catalog.pg_table_is_visible(c.oid)",
379379
/* namespace */
@@ -2826,7 +2826,7 @@ psql_completion(char *text, int start, int end)
28262826

28272827
/* must be at end of \d list */
28282828
else if (strncmp(prev_wd, "\\d", strlen("\\d")) == 0)
2829-
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tisvf, NULL);
2829+
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_relations, NULL);
28302830

28312831
else if (strcmp(prev_wd, "\\ef") == 0)
28322832
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_functions, NULL);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy