Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
2f86ab77
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,发现更多精彩内容 >>
提交
2f86ab77
编写于
12月 28, 2007
作者:
M
Michael Meskes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
*** empty log message ***
上级
79bb2638
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
53 addition
and
41 deletion
+53
-41
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+7
-0
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+2
-2
src/interfaces/ecpg/test/connect/test5.pgc
src/interfaces/ecpg/test/connect/test5.pgc
+2
-1
src/interfaces/ecpg/test/expected/connect-test5.c
src/interfaces/ecpg/test/expected/connect-test5.c
+35
-31
src/interfaces/ecpg/test/expected/connect-test5.stderr
src/interfaces/ecpg/test/expected/connect-test5.stderr
+7
-7
未找到文件。
src/interfaces/ecpg/ChangeLog
浏览文件 @
2f86ab77
...
...
@@ -2272,6 +2272,13 @@ Tue, 06 Nov 2007 09:29:22 +0100
Fri, 21 Dec 2007 15:30:39 +0100
- Fixed a few minor glitches pointed out by splint.
Fri, 28 Dec 2007 12:15:38 +0100
- Applied patch send by ITAGAKI Takahiro
<itagaki.takahiro@oss.ntt.co.jp> to fix bug in connect statement if
user name is a variable.
- Also fixed test case that didn't detect this.
- Set pgtypes library version to 3.0.
- Set compat library version to 3.0.
- Set ecpg library version to 6.0.
...
...
src/interfaces/ecpg/preproc/preproc.y
浏览文件 @
2f86ab77
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.35
6 2007/12/21 14:33:20
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.35
7 2007/12/28 11:25:21
meskes Exp $ */
/* Copyright comment */
%{
...
...
@@ -5114,7 +5114,7 @@ user_name: RoleId
{
if ($1[0] == '\"')
$$ = $1;
else if (
strcmp($1, " ?") == 0
) /* variable */
else if (
$1[1] == '$'
) /* variable */
{
enum ECPGttype type = argsinsert->variable->type->type;
...
...
src/interfaces/ecpg/test/connect/test5.pgc
浏览文件 @
2f86ab77
...
...
@@ -15,6 +15,7 @@ main(void)
exec sql begin declare section;
char db[200];
char id[200];
char *user="connectuser";
exec sql end declare section;
ECPGdebug(1, stderr);
...
...
@@ -49,7 +50,7 @@ exec sql end declare section;
exec sql connect to "unix:postgresql://localhost/connectdb" as main user connectuser;
exec sql disconnect main;
exec sql connect to 'unix:postgresql://localhost/connectdb' as main user
connect
user;
exec sql connect to 'unix:postgresql://localhost/connectdb' as main user
:
user;
exec sql disconnect main;
exec sql connect to "unix:postgresql://200.46.204.71/connectdb" as main user connectuser;
...
...
src/interfaces/ecpg/test/expected/connect-test5.c
浏览文件 @
2f86ab77
...
...
@@ -25,121 +25,125 @@ main(void)
/* exec sql begin declare section */
#line 16 "test5.pgc"
char
db
[
200
]
;
#line 17 "test5.pgc"
char
id
[
200
]
;
/* exec sql end declare section */
#line 18 "test5.pgc"
char
*
user
=
"connectuser"
;
/* exec sql end declare section */
#line 19 "test5.pgc"
ECPGdebug
(
1
,
stderr
);
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
NULL
,
NULL
,
"main"
,
0
);
}
#line 2
2
"test5.pgc"
#line 2
3
"test5.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"alter user connectuser encrypted password 'connectpw'"
,
ECPGt_EOIT
,
ECPGt_EORT
);}
#line 2
3
"test5.pgc"
#line 2
4
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"CURRENT"
);}
#line 2
4
"test5.pgc"
#line 2
5
"test5.pgc"
/* <-- "main" not specified */
strcpy
(
db
,
"connectdb"
);
strcpy
(
id
,
"main"
);
{
ECPGconnect
(
__LINE__
,
0
,
db
,
NULL
,
NULL
,
id
,
0
);
}
#line 2
8
"test5.pgc"
#line 2
9
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
id
);}
#line
29
"test5.pgc"
#line
30
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
NULL
,
NULL
,
"main"
,
0
);
}
#line 3
1
"test5.pgc"
#line 3
2
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 3
2
"test5.pgc"
#line 3
3
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
NULL
,
NULL
,
"main"
,
0
);
}
#line 3
4
"test5.pgc"
#line 3
5
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 3
5
"test5.pgc"
#line 3
6
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
NULL
,
NULL
,
"main"
,
0
);
}
#line 3
7
"test5.pgc"
#line 3
8
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 3
8
"test5.pgc"
#line 3
9
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
""
,
"connectdb"
,
NULL
,
"main"
,
0
);
}
#line 4
0
"test5.pgc"
#line 4
1
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 4
1
"test5.pgc"
#line 4
2
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
"connectuser"
,
"connectdb"
,
"main"
,
0
);
}
#line 4
3
"test5.pgc"
#line 4
4
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 4
4
"test5.pgc"
#line 4
5
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/connectdb"
,
"connectuser"
,
NULL
,
"main"
,
0
);
}
#line 4
6
"test5.pgc"
#line 4
7
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 4
7
"test5.pgc"
#line 4
8
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/connectdb"
,
"connectuser"
,
NULL
,
"main"
,
0
);
}
#line
49
"test5.pgc"
#line
50
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 5
0
"test5.pgc"
#line 5
1
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/connectdb"
,
"connectuser"
,
NULL
,
"main"
,
0
);
}
#line 5
2
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/connectdb"
,
user
,
NULL
,
"main"
,
0
);
}
#line 5
3
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 5
3
"test5.pgc"
#line 5
4
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://200.46.204.71/connectdb"
,
"connectuser"
,
NULL
,
"main"
,
0
);
}
#line 5
5
"test5.pgc"
#line 5
6
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 5
6
"test5.pgc"
#line 5
7
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"unix:postgresql://localhost/"
,
"connectdb"
,
NULL
,
"main"
,
0
);
}
#line 5
8
"test5.pgc"
#line 5
9
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line
59
"test5.pgc"
#line
60
"test5.pgc"
/* connect twice */
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
NULL
,
NULL
,
"main"
,
0
);
}
#line 6
2
"test5.pgc"
#line 6
3
"test5.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
NULL
,
NULL
,
"main"
,
0
);
}
#line 6
3
"test5.pgc"
#line 6
4
"test5.pgc"
{
ECPGdisconnect
(
__LINE__
,
"main"
);}
#line 6
4
"test5.pgc"
#line 6
5
"test5.pgc"
/* not connected */
{
ECPGdisconnect
(
__LINE__
,
"nonexistant"
);}
#line 6
7
"test5.pgc"
#line 6
8
"test5.pgc"
return
(
0
);
...
...
src/interfaces/ecpg/test/expected/connect-test5.stderr
浏览文件 @
2f86ab77
...
...
@@ -2,11 +2,11 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute line 2
3
: QUERY: alter user connectuser encrypted password 'connectpw' with 0 parameter on connection main
[NO_PID]: ecpg_execute line 2
4
: QUERY: alter user connectuser encrypted password 'connectpw' with 0 parameter on connection main
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute line 2
3
: using PQexec
[NO_PID]: ecpg_execute line 2
4
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute line 2
3
Ok: ALTER ROLE
[NO_PID]: ecpg_execute line 2
4
Ok: ALTER ROLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
...
...
@@ -46,11 +46,11 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: non-localhost access via sockets in line 5
5
[NO_PID]: ECPGconnect: non-localhost access via sockets in line 5
6
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode -402 in line 5
5, 'Could not connect to database connectdb in line 55
.'.
[NO_PID]: raising sqlcode -402 in line 5
6, 'Could not connect to database connectdb in line 56
.'.
[NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: raising sqlcode -220 in line 5
6, 'No such connection main in line 56
.'.
[NO_PID]: raising sqlcode -220 in line 5
7, 'No such connection main in line 57
.'.
[NO_PID]: sqlca: code: -220, state: 08003
[NO_PID]: ECPGconnect: opening database on <DEFAULT> port <DEFAULT> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
...
...
@@ -62,5 +62,5 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: Connection main closed.
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode -220 in line 6
7, 'No such connection nonexistant in line 67
.'.
[NO_PID]: raising sqlcode -220 in line 6
8, 'No such connection nonexistant in line 68
.'.
[NO_PID]: sqlca: code: -220, state: 08003
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录