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
da9ee026
Commit
da9ee026
authored
Jun 22, 2015
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psql: Add some tab completion for TABLESAMPLE.
Petr Jelinek, reviewed by Brendan Jurd
parent
4318118e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+12
-0
No files found.
src/bin/psql/tab-complete.c
View file @
da9ee026
...
...
@@ -737,6 +737,11 @@ static const SchemaQuery Query_for_list_of_matviews = {
" FROM pg_catalog.pg_event_trigger "\
" WHERE substring(pg_catalog.quote_ident(evtname),1,%d)='%s'"
#define Query_for_list_of_tablesample_methods \
" SELECT pg_catalog.quote_ident(tsmname) "\
" FROM pg_catalog.pg_tablesample_method "\
" WHERE substring(pg_catalog.quote_ident(tsmname),1,%d)='%s'"
/*
* This is a list of all "things" in Pgsql, which can show up after CREATE or
* DROP; and there is also a query to get a list of them.
...
...
@@ -3580,6 +3585,13 @@ psql_completion(const char *text, int start, int end)
prev2_wd
[
0
]
==
'\0'
)
COMPLETE_WITH_SCHEMA_QUERY
(
Query_for_list_of_relations
,
NULL
);
/* TABLESAMPLE */
else
if
(
pg_strcasecmp
(
prev_wd
,
"TABLESAMPLE"
)
==
0
)
COMPLETE_WITH_QUERY
(
Query_for_list_of_tablesample_methods
);
else
if
(
pg_strcasecmp
(
prev2_wd
,
"TABLESAMPLE"
)
==
0
)
COMPLETE_WITH_CONST
(
"("
);
/* TRUNCATE */
else
if
(
pg_strcasecmp
(
prev_wd
,
"TRUNCATE"
)
==
0
)
COMPLETE_WITH_SCHEMA_QUERY
(
Query_for_list_of_tables
,
NULL
);
...
...
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