Content-Length: 263288 | pFad | http://github.com/postgrespro/postgres_cluster/commit/a7c4dad1a770c1c4256aa87e01a85172e1549aad

AD Fix psql's tab completion for ALTER DATABASE ... SET TABLESPACE. · postgrespro/postgres_cluster@a7c4dad · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/a7c4dad1a770c1c4256aa87e01a85172e1549aad

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy