Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
79a1a2ec
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,发现更多精彩内容 >>
提交
79a1a2ec
编写于
8月 08, 2006
作者:
M
Michael Meskes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleaned up log output a little bit more.
上级
75b56307
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
42 addition
and
11 deletion
+42
-11
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/execute.c
+2
-4
src/interfaces/ecpg/test/expected/complex-test2.stderr
src/interfaces/ecpg/test/expected/complex-test2.stderr
+12
-0
src/interfaces/ecpg/test/expected/complex-test3.stderr
src/interfaces/ecpg/test/expected/complex-test3.stderr
+8
-0
src/interfaces/ecpg/test/expected/sql-dynalloc.stderr
src/interfaces/ecpg/test/expected/sql-dynalloc.stderr
+16
-6
src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr
src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr
+4
-1
未找到文件。
src/interfaces/ecpg/ecpglib/execute.c
浏览文件 @
79a1a2ec
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.5
6 2006/08/02 13:43:23
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.5
7 2006/08/08 15:30:39
meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -421,9 +421,6 @@ ECPGstore_result(const PGresult *results, int act_field,
len
+=
strlen
(
PQgetvalue
(
results
,
act_tuple
,
act_field
))
+
1
;
len
*=
var
->
offset
;
/* should be 1, but YMNK */
len
+=
(
ntuples
+
1
)
*
sizeof
(
char
*
);
ECPGlog
(
"ECPGstore_result: line %d: allocating %d bytes for %d tuples (char**=0)"
,
stmt
->
lineno
,
len
,
ntuples
);
}
else
{
...
...
@@ -447,6 +444,7 @@ ECPGstore_result(const PGresult *results, int act_field,
len
=
var
->
offset
*
ntuples
;
break
;
}
ECPGlog
(
"ECPGstore_result: line %d: allocating memory for %d tuples
\n
"
,
stmt
->
lineno
,
ntuples
);
var
->
value
=
(
char
*
)
ECPGalloc
(
len
,
stmt
->
lineno
);
if
(
!
var
->
value
)
return
false
;
...
...
src/interfaces/ecpg/test/expected/complex-test2.stderr
浏览文件 @
79a1a2ec
...
...
@@ -42,6 +42,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 04-04-1990 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 3 offset: -1 array: Yes
...
...
@@ -56,6 +58,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 35 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 04-04-1990 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 3 offset: -1 array: Yes
...
...
@@ -70,6 +74,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 10 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
...
...
@@ -84,6 +90,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 8 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
...
...
@@ -98,6 +106,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: 4 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 70: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 70: RESULT: offset: -1 array: Yes
...
...
@@ -128,6 +138,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 100: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 100: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 100: RESULT: 04-04-1990 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 100: RESULT: 3 offset: -1 array: Yes
...
...
src/interfaces/ecpg/test/expected/complex-test3.stderr
浏览文件 @
79a1a2ec
...
...
@@ -46,6 +46,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: 10 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 64: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
...
...
@@ -60,6 +62,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: 8 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 64: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
...
...
@@ -74,6 +78,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: 4 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 64: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 64: RESULT: offset: -1 array: Yes
...
...
@@ -104,6 +110,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 94: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 94: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 94: RESULT: 04-04-1990 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 94: RESULT: 3 offset: -1 array: Yes
...
...
src/interfaces/ecpg/test/expected/sql-dynalloc.stderr
浏览文件 @
79a1a2ec
...
...
@@ -22,54 +22,64 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 41: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 41: RESULT: 1 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 41: RESULT: 2 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 42: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 42: RESULT: 23.456 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 42: RESULT: 2.446 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 3
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 43: allocating 21 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 43: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 43: RESULT: varchar offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 43: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 4
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 44: allocating 16 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 44: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 44: RESULT: v offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 44: RESULT: v offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 5
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 45: allocating 22 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 45: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 45: RESULT: c offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 45: RESULT: c offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 6
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 46: allocating 70 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 46: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 46: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 46: RESULT: Mon Mar 03 11:33:07 2003 PST offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 7
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 47: allocating 16 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 47: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 47: RESULT: t offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 47: RESULT: f offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 9
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 50: allocating 46 bytes for 2 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 50: allocating memory for 2 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 50: RESULT: 2001:4f8:3:ba:2e0:81ff:fe22:d1f1 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 50: RESULT: offset: -1 array: Yes
...
...
src/interfaces/ecpg/test/expected/sql-dynalloc2.stderr
浏览文件 @
79a1a2ec
...
...
@@ -40,6 +40,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 33: allocating memory for 6 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 33: RESULT: 1 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 33: RESULT: 2 offset: -1 array: Yes
...
...
@@ -54,7 +56,8 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_desc: reading items for tuple 2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 34: allocating 49 bytes for 6 tuples (char**=0)[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 34: allocating memory for 6 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 34: RESULT: one offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 34: RESULT: two offset: -1 array: Yes
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录