Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
9f990a73
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,发现更多精彩内容 >>
提交
9f990a73
编写于
9月 13, 2001
作者:
H
Hiroshi Inoue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1) Not export ODBC 3.0 functions.
2) (Maybe) fix a bug reported by Mika Muntila.
上级
f93449eb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
58 addition
and
29 deletion
+58
-29
src/interfaces/odbc/convert.c
src/interfaces/odbc/convert.c
+10
-3
src/interfaces/odbc/drvconn.c
src/interfaces/odbc/drvconn.c
+3
-0
src/interfaces/odbc/environ.c
src/interfaces/odbc/environ.c
+17
-4
src/interfaces/odbc/info.c
src/interfaces/odbc/info.c
+20
-0
src/interfaces/odbc/pgtypes.c
src/interfaces/odbc/pgtypes.c
+8
-0
src/interfaces/odbc/psqlodbc_win32.def
src/interfaces/odbc/psqlodbc_win32.def
+0
-22
未找到文件。
src/interfaces/odbc/convert.c
浏览文件 @
9f990a73
...
...
@@ -1674,12 +1674,19 @@ copy_statement_with_parameters(StatementClass *stmt)
if
(
buf
)
{
CVT_APPEND_DATA
(
buf
,
used
);
switch
(
used
)
{
case
SQL_NULL_DATA
:
break
;
case
SQL_NTS
:
CVT_APPEND_STR
(
buf
);
break
;
default:
CVT_APPEND_DATA
(
buf
,
used
);
}
}
else
{
CVT_APPEND_STR
(
param_string
);
}
if
(
param_sqltype
==
SQL_BIT
)
CVT_APPEND_CHAR
(
'\''
);
/* Close Quote */
...
...
src/interfaces/odbc/drvconn.c
浏览文件 @
9f990a73
...
...
@@ -230,6 +230,9 @@ dialog:
if
(
len
>=
cbConnStrOutMax
)
{
int
clen
;
for
(
clen
=
strlen
(
szConnStrOut
)
-
1
;
clen
>=
0
&&
szConnStrOut
[
clen
]
!=
';'
;
clen
--
)
szConnStrOut
[
clen
]
=
'\0'
;
result
=
SQL_SUCCESS_WITH_INFO
;
conn
->
errornumber
=
CONN_TRUNCATED
;
conn
->
errormsg
=
"The buffer was too small for the ConnStrOut."
;
...
...
src/interfaces/odbc/environ.c
浏览文件 @
9f990a73
...
...
@@ -92,6 +92,8 @@ PGAPI_Error(
{
char
*
msg
;
int
status
;
BOOL
once_again
=
FALSE
;
SWORD
msglen
;
mylog
(
"**** PGAPI_Error: henv=%u, hdbc=%u, hstmt=%u <%d>
\n
"
,
henv
,
hdbc
,
hstmt
,
cbErrorMsgMax
);
...
...
@@ -101,8 +103,6 @@ PGAPI_Error(
{
/* CC: return an error of a hstmt */
StatementClass
*
stmt
=
(
StatementClass
*
)
hstmt
;
SWORD
msglen
;
BOOL
once_again
=
FALSE
;
if
(
SC_get_error
(
stmt
,
&
status
,
&
msg
))
{
...
...
@@ -306,8 +306,15 @@ PGAPI_Error(
return
SQL_NO_DATA_FOUND
;
}
msglen
=
strlen
(
msg
);
if
(
NULL
!=
pcbErrorMsg
)
*
pcbErrorMsg
=
(
SWORD
)
strlen
(
msg
);
{
*
pcbErrorMsg
=
msglen
;
if
(
cbErrorMsgMax
==
0
)
once_again
=
TRUE
;
else
if
(
msglen
>=
cbErrorMsgMax
)
*
pcbErrorMsg
=
cbErrorMsgMax
-
1
;
}
if
((
NULL
!=
szErrorMsg
)
&&
(
cbErrorMsgMax
>
0
))
strncpy_null
(
szErrorMsg
,
msg
,
cbErrorMsgMax
);
if
(
NULL
!=
pfNativeError
)
...
...
@@ -391,7 +398,13 @@ PGAPI_Error(
return
SQL_NO_DATA_FOUND
;
}
return
SQL_SUCCESS
;
if
(
once_again
)
{
conn
->
errornumber
=
status
;
return
SQL_SUCCESS_WITH_INFO
;
}
else
return
SQL_SUCCESS
;
}
else
if
(
SQL_NULL_HENV
!=
henv
)
{
...
...
src/interfaces/odbc/info.c
浏览文件 @
9f990a73
...
...
@@ -3614,9 +3614,29 @@ PGAPI_Procedures(
SWORD
cbProcName
)
{
static
char
*
func
=
"PGAPI_Procedures"
;
StatementClass
*
stmt
=
(
StatementClass
*
)
hstmt
;
Int2
result_cols
;
mylog
(
"%s: entering...
\n
"
,
func
);
/*
* a statement is actually executed, so we'll have to do this
* ourselves.
*/
result_cols
=
8
;
extend_bindings
(
stmt
,
result_cols
);
/* set the field names */
QR_set_num_fields
(
stmt
->
result
,
result_cols
);
QR_set_field_info
(
stmt
->
result
,
0
,
"PROCEDURE_CAT"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
1
,
"PROCEDURE_SCHEM"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
2
,
"PROCEDURE_NAME"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
3
,
"NUM_INPUT_PARAMS"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
4
,
"NUM_OUTPUT_PARAMS"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
5
,
"NUM_RESULT_SET"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
6
,
"REMARKS"
,
PG_TYPE_TEXT
,
MAX_INFO_STRING
);
QR_set_field_info
(
stmt
->
result
,
7
,
"PROCEDURE_TYPE"
,
PG_TYPE_INT2
,
2
);
SC_log_error
(
func
,
"Function not implemented"
,
(
StatementClass
*
)
hstmt
);
return
SQL_ERROR
;
}
...
...
src/interfaces/odbc/pgtypes.c
浏览文件 @
9f990a73
...
...
@@ -698,7 +698,15 @@ pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_
/* Character types (and NUMERIC) use the default precision */
case
PG_TYPE_VARCHAR
:
case
PG_TYPE_BPCHAR
:
#ifdef MULTIBYTE
/* after 7.2 */
if
(
PG_VERSION_GE
(
SC_get_conn
(
stmt
),
7
.
2
)
return
3
*
pgtype_precision
(
stmt
,
type
,
col
,
handle_unknown_size_as
);
else
#else
/* CR -> CR/LF */
return
2
*
pgtype_precision
(
stmt
,
type
,
col
,
handle_unknown_size_as
);
#endif
/* MULTIBYTE */
default:
return
pgtype_precision
(
stmt
,
type
,
col
,
handle_unknown_size_as
);
}
...
...
src/interfaces/odbc/psqlodbc_win32.def
浏览文件 @
9f990a73
...
...
@@ -53,28 +53,6 @@ SQLSetPos @68
SQLSetScrollOptions @69
SQLTablePrivileges @70
SQLBindParameter @72
SQLAllocHandle @80
SQLBindParam @81
SQLCloseCursor @82
SQLColAttribute @83
SQLCopyDesc @84
SQLEndTran @85
SQLFetchScroll @86
SQLFreeHandle @87
SQLGetDescField @88
SQLGetDescRec @89
SQLGetDiagField @90
SQLGetDiagRec @91
SQLGetEnvAttr @92
SQLGetConnectAttr @93
SQLGetStmtAttr @94
SQLSetConnectAttr @95
SQLSetDescField @96
SQLSetDescRec @97
SQLSetEnvAttr @98
SQLSetStmtAttr @99
SQLDummyOrdinal @199
dconn_FDriverConnectProc @200
DllMain @201
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录