Skip to content

Commit 21e567b

Browse files
committed
Improve tab completion macro for default keywords.
1 parent a7dc90d commit 21e567b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/bin/psql/tab-complete.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.147 2006/02/12 07:21:40 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.148 2006/02/12 15:25:04 momjian Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -140,8 +140,6 @@ static const SchemaQuery *completion_squery; /* to pass a SchemaQuery */
140140
*/
141141
#define COMPLETE_WITH_QUERY(query) \
142142
do { completion_charp = query; matches = completion_matches(text, complete_from_query); } while(0)
143-
#define COMPLETE_WITH_QUERY_ADDON(query, addon) \
144-
do { completion_charp = query addon; matches = completion_matches(text, complete_from_query); } while(0)
145143
#define COMPLETE_WITH_SCHEMA_QUERY(query, addon) \
146144
do { completion_squery = &(query); completion_charp = addon; matches = completion_matches(text, complete_from_schema_query); } while(0)
147145
#define COMPLETE_WITH_LIST(list) \
@@ -1657,7 +1655,7 @@ psql_completion(char *text, int start, int end)
16571655
else if (pg_strcasecmp(prev3_wd, "SET") == 0
16581656
&& pg_strcasecmp(prev2_wd, "SESSION") == 0
16591657
&& pg_strcasecmp(prev_wd, "AUTHORIZATION") == 0)
1660-
COMPLETE_WITH_QUERY_ADDON(Query_for_list_of_roles, " UNION SELECT 'DEFAULT'");
1658+
COMPLETE_WITH_QUERY(Query_for_list_of_roles " UNION SELECT 'DEFAULT'");
16611659
/* Complete RESET SESSION with AUTHORIZATION */
16621660
else if (pg_strcasecmp(prev2_wd, "RESET") == 0 &&
16631661
pg_strcasecmp(prev_wd, "SESSION") == 0)

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