From 525eb4d3959f316338160bfbcc769f64c16310a0 Mon Sep 17 00:00:00 2001 From: Vignesh C Date: Sun, 2 Oct 2022 10:59:59 +0530 Subject: [PATCH v2 2/2] Include CURRENT_ROLE, CURRENT_USER and SESSION_USER in tab completion while changing owner. Include CURRENT_ROLE, CURRENT_USER and SESSION_USER in tab completion while changing owner. --- src/bin/psql/tab-complete.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 2818fb26a0..584d9d5ae6 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -4160,7 +4160,10 @@ psql_completion(const char *text, int start, int end) /* OWNER TO - complete with available roles */ else if (TailMatches("OWNER", "TO")) - COMPLETE_WITH_QUERY(Query_for_list_of_roles); + COMPLETE_WITH_QUERY_PLUS(Query_for_list_of_roles, + "CURRENT_ROLE", + "CURRENT_USER", + "SESSION_USER"); /* ORDER BY */ else if (TailMatches("FROM", MatchAny, "ORDER")) -- 2.32.0