Skip to content

Commit a7c4dad

Browse files
committed
Fix psql's tab completion for ALTER DATABASE ... SET TABLESPACE.
We have the infrastructure to offer a list of tablespace names, but it wasn't being used here; instead you got "FROM", "CURRENT", and "TO" which aren't actually legal in this syntax. Dagfinn Ilmari Mannsåker, reviewed by Arthur Zakirov Discussion: https://postgr.es/m/d8jo9djvm7h.fsf@dalvik.ping.uio.no
1 parent 1dba1b6 commit a7c4dad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bin/psql/tab-complete.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,10 @@ psql_completion(const char *text, int start, int end)
15881588
"IS_TEMPLATE", "ALLOW_CONNECTIONS",
15891589
"CONNECTION LIMIT");
15901590

1591+
/* ALTER DATABASE <name> SET TABLESPACE */
1592+
else if (Matches5("ALTER", "DATABASE", MatchAny, "SET", "TABLESPACE"))
1593+
COMPLETE_WITH_QUERY(Query_for_list_of_tablespaces);
1594+
15911595
/* ALTER EVENT TRIGGER */
15921596
else if (Matches3("ALTER", "EVENT", "TRIGGER"))
15931597
COMPLETE_WITH_QUERY(Query_for_list_of_event_triggers);

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