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
158e3bc8
Commit
158e3bc8
authored
Aug 04, 2015
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tab completion for CREATE SEQUENCE.
Vik Fearing, reviewed by Brendan Jurd, Michael Paquier, and myself
parent
a6a23578
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+29
-0
No files found.
src/bin/psql/tab-complete.c
View file @
158e3bc8
...
@@ -2467,6 +2467,35 @@ psql_completion(const char *text, int start, int end)
...
@@ -2467,6 +2467,35 @@ psql_completion(const char *text, int start, int end)
pg_strcasecmp
(
prev_wd
,
"TO"
)
==
0
)
pg_strcasecmp
(
prev_wd
,
"TO"
)
==
0
)
COMPLETE_WITH_SCHEMA_QUERY
(
Query_for_list_of_tables
,
NULL
);
COMPLETE_WITH_SCHEMA_QUERY
(
Query_for_list_of_tables
,
NULL
);
/* CREATE TEMP/TEMPORARY SEQUENCE <name> */
else
if
((
pg_strcasecmp
(
prev3_wd
,
"CREATE"
)
==
0
&&
pg_strcasecmp
(
prev2_wd
,
"SEQUENCE"
)
==
0
)
||
(
pg_strcasecmp
(
prev4_wd
,
"CREATE"
)
==
0
&&
(
pg_strcasecmp
(
prev3_wd
,
"TEMP"
)
==
0
||
pg_strcasecmp
(
prev3_wd
,
"TEMPORARY"
)
==
0
)
&&
pg_strcasecmp
(
prev2_wd
,
"SEQUENCE"
)
==
0
))
{
static
const
char
*
const
list_CREATESEQUENCE
[]
=
{
"INCREMENT BY"
,
"MINVALUE"
,
"MAXVALUE"
,
"NO"
,
"CACHE"
,
"CYCLE"
,
"OWNED BY"
,
"START WITH"
,
NULL
};
COMPLETE_WITH_LIST
(
list_CREATESEQUENCE
);
}
/* CREATE TEMP/TEMPORARY SEQUENCE <name> NO */
else
if
(((
pg_strcasecmp
(
prev4_wd
,
"CREATE"
)
==
0
&&
pg_strcasecmp
(
prev3_wd
,
"SEQUENCE"
)
==
0
)
||
(
pg_strcasecmp
(
prev5_wd
,
"CREATE"
)
==
0
&&
(
pg_strcasecmp
(
prev4_wd
,
"TEMP"
)
==
0
||
pg_strcasecmp
(
prev4_wd
,
"TEMPORARY"
)
==
0
)
&&
pg_strcasecmp
(
prev3_wd
,
"SEQUENCE"
)
==
0
))
&&
pg_strcasecmp
(
prev_wd
,
"NO"
)
==
0
)
{
static
const
char
*
const
list_CREATESEQUENCE2
[]
=
{
"MINVALUE"
,
"MAXVALUE"
,
"CYCLE"
,
NULL
};
COMPLETE_WITH_LIST
(
list_CREATESEQUENCE2
);
}
/* CREATE SERVER <name> */
/* CREATE SERVER <name> */
else
if
(
pg_strcasecmp
(
prev3_wd
,
"CREATE"
)
==
0
&&
else
if
(
pg_strcasecmp
(
prev3_wd
,
"CREATE"
)
==
0
&&
pg_strcasecmp
(
prev2_wd
,
"SERVER"
)
==
0
)
pg_strcasecmp
(
prev2_wd
,
"SERVER"
)
==
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