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
e49ad77f
Commit
e49ad77f
authored
Apr 01, 2011
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tab completion for COMMENT ON FOREIGN DATA WRAPPER / SERVER.
parent
dd095b62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+16
-2
No files found.
src/bin/psql/tab-complete.c
View file @
e49ad77f
...
...
@@ -714,7 +714,8 @@ psql_completion(char *text, int start, int end)
*
prev2_wd
,
*
prev3_wd
,
*
prev4_wd
,
*
prev5_wd
;
*
prev5_wd
,
*
prev6_wd
;
static
const
char
*
const
sql_commands
[]
=
{
"ABORT"
,
"ALTER"
,
"ANALYZE"
,
"BEGIN"
,
"CHECKPOINT"
,
"CLOSE"
,
"CLUSTER"
,
...
...
@@ -762,6 +763,7 @@ psql_completion(char *text, int start, int end)
prev3_wd
=
previous_word
(
start
,
2
);
prev4_wd
=
previous_word
(
start
,
3
);
prev5_wd
=
previous_word
(
start
,
4
);
prev6_wd
=
previous_word
(
start
,
5
);
/* If a backslash command was started, continue */
if
(
text
[
0
]
==
'\\'
)
...
...
@@ -1547,13 +1549,23 @@ psql_completion(char *text, int start, int end)
pg_strcasecmp
(
prev_wd
,
"ON"
)
==
0
)
{
static
const
char
*
const
list_COMMENT
[]
=
{
"CAST"
,
"COLLATION"
,
"CONVERSION"
,
"DATABASE"
,
"FOREIGN TABLE"
,
"INDEX"
,
"LANGUAGE"
,
"RULE"
,
"SCHEMA"
,
{
"CAST"
,
"COLLATION"
,
"CONVERSION"
,
"DATABASE"
,
"FOREIGN DATA WRAPPER"
,
"SERVER"
,
"FOREIGN TABLE"
,
"INDEX"
,
"LANGUAGE"
,
"RULE"
,
"SCHEMA"
,
"SEQUENCE"
,
"TABLE"
,
"TYPE"
,
"VIEW"
,
"COLUMN"
,
"AGGREGATE"
,
"FUNCTION"
,
"OPERATOR"
,
"TRIGGER"
,
"CONSTRAINT"
,
"DOMAIN"
,
"LARGE OBJECT"
,
"TABLESPACE"
,
"TEXT SEARCH"
,
"ROLE"
,
NULL
};
COMPLETE_WITH_LIST
(
list_COMMENT
);
}
else
if
(
pg_strcasecmp
(
prev3_wd
,
"COMMENT"
)
==
0
&&
pg_strcasecmp
(
prev2_wd
,
"ON"
)
==
0
&&
pg_strcasecmp
(
prev_wd
,
"FOREIGN"
)
==
0
)
{
static
const
char
*
const
list_TRANS2
[]
=
{
"DATA WRAPPER"
,
"TABLE"
,
NULL
};
COMPLETE_WITH_LIST
(
list_TRANS2
);
}
else
if
(
pg_strcasecmp
(
prev4_wd
,
"COMMENT"
)
==
0
&&
pg_strcasecmp
(
prev3_wd
,
"ON"
)
==
0
&&
pg_strcasecmp
(
prev2_wd
,
"TEXT"
)
==
0
&&
...
...
@@ -1566,6 +1578,8 @@ psql_completion(char *text, int start, int end)
}
else
if
((
pg_strcasecmp
(
prev4_wd
,
"COMMENT"
)
==
0
&&
pg_strcasecmp
(
prev3_wd
,
"ON"
)
==
0
)
||
(
pg_strcasecmp
(
prev6_wd
,
"COMMENT"
)
==
0
&&
pg_strcasecmp
(
prev5_wd
,
"ON"
)
==
0
)
||
(
pg_strcasecmp
(
prev5_wd
,
"ON"
)
==
0
&&
pg_strcasecmp
(
prev4_wd
,
"TEXT"
)
==
0
&&
pg_strcasecmp
(
prev3_wd
,
"SEARCH"
)
==
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