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
752a4dac
Commit
752a4dac
authored
Jun 12, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
psql: tab completion for \encoding
Ian Barwick
parent
9243664d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+8
-1
No files found.
src/bin/psql/tab-complete.c
View file @
752a4dac
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright 2000-2002 by PostgreSQL Global Development Group
* Copyright 2000-2002 by PostgreSQL Global Development Group
*
*
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.
79 2003/06/11 22:13:22
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.
80 2003/06/12 01:38:08
momjian Exp $
*/
*/
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
...
@@ -207,6 +207,11 @@ initialize_readline(void)
...
@@ -207,6 +207,11 @@ initialize_readline(void)
" WHERE substr(nspname,1,%d)='%s' "\
" WHERE substr(nspname,1,%d)='%s' "\
" HAVING COUNT(nspname)=1))"
" HAVING COUNT(nspname)=1))"
#define Query_for_list_of_encodings \
" SELECT DISTINCT pg_catalog.pg_encoding_to_char(conforencoding) "\
" FROM pg_catalog.pg_conversion "\
" WHERE substr(pg_catalog.pg_encoding_to_char(conforencoding),1,%d)=UPPER('%s')"
#define Query_for_list_of_functions \
#define Query_for_list_of_functions \
" SELECT DISTINCT proname || '()' "\
" SELECT DISTINCT proname || '()' "\
" FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n "\
" FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n "\
...
@@ -1273,6 +1278,8 @@ psql_completion(char *text, int start, int end)
...
@@ -1273,6 +1278,8 @@ psql_completion(char *text, int start, int end)
COMPLETE_WITH_QUERY
(
Query_for_list_of_users
);
COMPLETE_WITH_QUERY
(
Query_for_list_of_users
);
else
if
(
strcmp
(
prev_wd
,
"
\\
dv"
)
==
0
||
strcmp
(
prev_wd
,
"
\\
dv+"
)
==
0
)
else
if
(
strcmp
(
prev_wd
,
"
\\
dv"
)
==
0
||
strcmp
(
prev_wd
,
"
\\
dv+"
)
==
0
)
COMPLETE_WITH_SCHEMA_QUERY
(
Query_for_list_of_views
);
COMPLETE_WITH_SCHEMA_QUERY
(
Query_for_list_of_views
);
else
if
(
strcmp
(
prev_wd
,
"
\\
encoding"
)
==
0
)
COMPLETE_WITH_QUERY
(
Query_for_list_of_encodings
);
else
if
(
strcmp
(
prev_wd
,
"
\\
h"
)
==
0
||
strcmp
(
prev_wd
,
"
\\
help"
)
==
0
)
else
if
(
strcmp
(
prev_wd
,
"
\\
h"
)
==
0
||
strcmp
(
prev_wd
,
"
\\
help"
)
==
0
)
COMPLETE_WITH_LIST
(
sql_commands
);
COMPLETE_WITH_LIST
(
sql_commands
);
else
if
(
strcmp
(
prev_wd
,
"
\\
pset"
)
==
0
)
else
if
(
strcmp
(
prev_wd
,
"
\\
pset"
)
==
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