diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-09-20 17:16:06 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-09-20 17:16:06 -0400 |
commit | a7c4dad1a770c1c4256aa87e01a85172e1549aad (patch) | |
tree | b067696b52a26689f4a1b4bfcfab1edc4ed1473f /src/bin/psql/tab-complete.c | |
parent | 1dba1b61c2fbe0164453963d51e7b0f6c49d8fca (diff) | |
download | postgresql-a7c4dad1a770c1c4256aa87e01a85172e1549aad.tar.gz postgresql-a7c4dad1a770c1c4256aa87e01a85172e1549aad.zip |
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
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r-- | src/bin/psql/tab-complete.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 7549b401922..3d627c10a18 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1588,6 +1588,10 @@ psql_completion(const char *text, int start, int end) "IS_TEMPLATE", "ALLOW_CONNECTIONS", "CONNECTION LIMIT"); + /* ALTER DATABASE <name> SET TABLESPACE */ + else if (Matches5("ALTER", "DATABASE", MatchAny, "SET", "TABLESPACE")) + COMPLETE_WITH_QUERY(Query_for_list_of_tablespaces); + /* ALTER EVENT TRIGGER */ else if (Matches3("ALTER", "EVENT", "TRIGGER")) COMPLETE_WITH_QUERY(Query_for_list_of_event_triggers); |