Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
084e385a
Commit
084e385a
authored
Dec 20, 2013
by
Fujii Masao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tab completion for ALTER SYSTEM SET in psql.
parent
f83a7545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+12
-1
No files found.
src/bin/psql/tab-complete.c
View file @
084e385a
...
@@ -541,6 +541,12 @@ static const SchemaQuery Query_for_list_of_matviews = {
...
@@ -541,6 +541,12 @@ static const SchemaQuery Query_for_list_of_matviews = {
"SELECT pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace "\
"SELECT pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace "\
" WHERE substring(pg_catalog.quote_ident(nspname),1,%d)='%s'"
" WHERE substring(pg_catalog.quote_ident(nspname),1,%d)='%s'"
#define Query_for_list_of_alter_system_set_vars \
"SELECT name FROM "\
" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\
" WHERE context != 'internal') ss "\
" WHERE substring(name,1,%d)='%s'"
#define Query_for_list_of_set_vars \
#define Query_for_list_of_set_vars \
"SELECT name FROM "\
"SELECT name FROM "\
" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\
" (SELECT pg_catalog.lower(name) AS name FROM pg_catalog.pg_settings "\
...
@@ -930,7 +936,7 @@ psql_completion(char *text, int start, int end)
...
@@ -930,7 +936,7 @@ psql_completion(char *text, int start, int end)
{
"AGGREGATE"
,
"COLLATION"
,
"CONVERSION"
,
"DATABASE"
,
"DEFAULT PRIVILEGES"
,
"DOMAIN"
,
{
"AGGREGATE"
,
"COLLATION"
,
"CONVERSION"
,
"DATABASE"
,
"DEFAULT PRIVILEGES"
,
"DOMAIN"
,
"EXTENSION"
,
"FOREIGN DATA WRAPPER"
,
"FOREIGN TABLE"
,
"FUNCTION"
,
"EXTENSION"
,
"FOREIGN DATA WRAPPER"
,
"FOREIGN TABLE"
,
"FUNCTION"
,
"GROUP"
,
"INDEX"
,
"LANGUAGE"
,
"LARGE OBJECT"
,
"MATERIALIZED VIEW"
,
"OPERATOR"
,
"GROUP"
,
"INDEX"
,
"LANGUAGE"
,
"LARGE OBJECT"
,
"MATERIALIZED VIEW"
,
"OPERATOR"
,
"ROLE"
,
"RULE"
,
"SCHEMA"
,
"SERVER"
,
"SEQUENCE
"
,
"TABLE"
,
"ROLE"
,
"RULE"
,
"SCHEMA"
,
"SERVER"
,
"SEQUENCE"
,
"SYSTEM SET
"
,
"TABLE"
,
"TABLESPACE"
,
"TEXT SEARCH"
,
"TRIGGER"
,
"TYPE"
,
"TABLESPACE"
,
"TEXT SEARCH"
,
"TRIGGER"
,
"TYPE"
,
"USER"
,
"USER MAPPING FOR"
,
"VIEW"
,
NULL
};
"USER"
,
"USER MAPPING FOR"
,
"VIEW"
,
NULL
};
...
@@ -1263,6 +1269,11 @@ psql_completion(char *text, int start, int end)
...
@@ -1263,6 +1269,11 @@ psql_completion(char *text, int start, int end)
COMPLETE_WITH_LIST
(
list_ALTER_SERVER
);
COMPLETE_WITH_LIST
(
list_ALTER_SERVER
);
}
}
/* ALTER SYSTEM SET <name> */
else
if
(
pg_strcasecmp
(
prev3_wd
,
"ALTER"
)
==
0
&&
pg_strcasecmp
(
prev2_wd
,
"SYSTEM"
)
==
0
&&
pg_strcasecmp
(
prev_wd
,
"SET"
)
==
0
)
COMPLETE_WITH_QUERY
(
Query_for_list_of_alter_system_set_vars
);
/* ALTER VIEW <name> */
/* ALTER VIEW <name> */
else
if
(
pg_strcasecmp
(
prev3_wd
,
"ALTER"
)
==
0
&&
else
if
(
pg_strcasecmp
(
prev3_wd
,
"ALTER"
)
==
0
&&
pg_strcasecmp
(
prev2_wd
,
"VIEW"
)
==
0
)
pg_strcasecmp
(
prev2_wd
,
"VIEW"
)
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment