Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
c19354df
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c19354df
编写于
4月 03, 2003
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
const-ify functions used with completion_matches(), to suppress
cast-away-const warnings from compilers pickier than gcc.
上级
906dce04
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
15 deletion
+16
-15
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+16
-15
未找到文件。
src/bin/psql/tab-complete.c
浏览文件 @
c19354df
...
@@ -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.7
5 2003/03/28 16:34:50 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.7
6 2003/04/03 20:18:16 tgl
Exp $
*/
*/
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
...
@@ -67,7 +67,7 @@ extern char *filename_completion_function();
...
@@ -67,7 +67,7 @@ extern char *filename_completion_function();
#endif
#endif
#ifdef HAVE_RL_COMPLETION_MATCHES
#ifdef HAVE_RL_COMPLETION_MATCHES
#define completion_matches
(x, y) rl_completion_matches((x), ((rl_compentry_func_t *)(y)))
#define completion_matches
rl_completion_matches
#endif
#endif
#define BUF_SIZE 2048
#define BUF_SIZE 2048
...
@@ -76,12 +76,13 @@ extern char *filename_completion_function();
...
@@ -76,12 +76,13 @@ extern char *filename_completion_function();
/* Forward declaration of functions */
/* Forward declaration of functions */
static
char
**
psql_completion
(
char
*
text
,
int
start
,
int
end
);
static
char
**
psql_completion
(
char
*
text
,
int
start
,
int
end
);
static
char
*
create_command_generator
(
char
*
text
,
int
state
);
static
char
*
create_command_generator
(
const
char
*
text
,
int
state
);
static
char
*
complete_from_query
(
char
*
text
,
int
state
);
static
char
*
complete_from_query
(
const
char
*
text
,
int
state
);
static
char
*
complete_from_schema_query
(
char
*
text
,
int
state
);
static
char
*
complete_from_schema_query
(
const
char
*
text
,
int
state
);
static
char
*
_complete_from_query
(
int
is_schema_query
,
char
*
text
,
int
state
);
static
char
*
_complete_from_query
(
int
is_schema_query
,
static
char
*
complete_from_const
(
char
*
text
,
int
state
);
const
char
*
text
,
int
state
);
static
char
*
complete_from_list
(
char
*
text
,
int
state
);
static
char
*
complete_from_const
(
const
char
*
text
,
int
state
);
static
char
*
complete_from_list
(
const
char
*
text
,
int
state
);
static
PGresult
*
exec_query
(
char
*
query
);
static
PGresult
*
exec_query
(
char
*
query
);
char
*
quote_file_name
(
char
*
text
,
int
match_type
,
char
*
quote_pointer
);
char
*
quote_file_name
(
char
*
text
,
int
match_type
,
char
*
quote_pointer
);
...
@@ -1357,7 +1358,7 @@ psql_completion(char *text, int start, int end)
...
@@ -1357,7 +1358,7 @@ psql_completion(char *text, int start, int end)
as defined above.
as defined above.
*/
*/
static
char
*
static
char
*
create_command_generator
(
char
*
text
,
int
state
)
create_command_generator
(
c
onst
c
har
*
text
,
int
state
)
{
{
static
int
list_index
,
static
int
list_index
,
string_length
;
string_length
;
...
@@ -1383,13 +1384,13 @@ create_command_generator(char *text, int state)
...
@@ -1383,13 +1384,13 @@ create_command_generator(char *text, int state)
/* The following two functions are wrappers for _complete_from_query */
/* The following two functions are wrappers for _complete_from_query */
static
char
*
static
char
*
complete_from_query
(
char
*
text
,
int
state
)
complete_from_query
(
c
onst
c
har
*
text
,
int
state
)
{
{
return
_complete_from_query
(
0
,
text
,
state
);
return
_complete_from_query
(
0
,
text
,
state
);
}
}
static
char
*
static
char
*
complete_from_schema_query
(
char
*
text
,
int
state
)
complete_from_schema_query
(
c
onst
c
har
*
text
,
int
state
)
{
{
return
_complete_from_query
(
1
,
text
,
state
);
return
_complete_from_query
(
1
,
text
,
state
);
}
}
...
@@ -1412,7 +1413,7 @@ complete_from_schema_query(char *text, int state)
...
@@ -1412,7 +1413,7 @@ complete_from_schema_query(char *text, int state)
*/
*/
static
char
*
static
char
*
_complete_from_query
(
int
is_schema_query
,
char
*
text
,
int
state
)
_complete_from_query
(
int
is_schema_query
,
c
onst
c
har
*
text
,
int
state
)
{
{
static
int
list_index
,
static
int
list_index
,
string_length
;
string_length
;
...
@@ -1421,7 +1422,7 @@ _complete_from_query(int is_schema_query, char *text, int state)
...
@@ -1421,7 +1422,7 @@ _complete_from_query(int is_schema_query, char *text, int state)
const
char
*
item
;
const
char
*
item
;
/*
/*
* If this is
t
the first time for this completion, we fetch a list of
* If this is the first time for this completion, we fetch a list of
* our "things" from the backend.
* our "things" from the backend.
*/
*/
if
(
state
==
0
)
if
(
state
==
0
)
...
@@ -1471,7 +1472,7 @@ _complete_from_query(int is_schema_query, char *text, int state)
...
@@ -1471,7 +1472,7 @@ _complete_from_query(int is_schema_query, char *text, int state)
SQL words that can appear at certain spot.
SQL words that can appear at certain spot.
*/
*/
static
char
*
static
char
*
complete_from_list
(
char
*
text
,
int
state
)
complete_from_list
(
c
onst
c
har
*
text
,
int
state
)
{
{
static
int
string_length
,
static
int
string_length
,
list_index
,
list_index
,
...
@@ -1531,7 +1532,7 @@ complete_from_list(char *text, int state)
...
@@ -1531,7 +1532,7 @@ complete_from_list(char *text, int state)
The string to be passed must be in completion_charp.
The string to be passed must be in completion_charp.
*/
*/
static
char
*
static
char
*
complete_from_const
(
char
*
text
,
int
state
)
complete_from_const
(
c
onst
c
har
*
text
,
int
state
)
{
{
(
void
)
text
;
/* We don't care about what was entered
(
void
)
text
;
/* We don't care about what was entered
* already. */
* already. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录