Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
a64927f9
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,发现更多精彩内容 >>
提交
a64927f9
编写于
6月 15, 2003
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ecpg cleanups for prototypes.
上级
228c02c3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
8 deletion
+14
-8
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/ecpglib/misc.c
+9
-6
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/include/ecpglib.h
+5
-2
未找到文件。
src/interfaces/ecpg/ecpglib/misc.c
浏览文件 @
a64927f9
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.
3 2003/06/15 04:07:58
momjian Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.
4 2003/06/15 04:56:45
momjian Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
...
...
@@ -78,7 +78,8 @@ static pthread_mutex_t debug_mutex = PTHREAD_MUTEX_INITIALIZER;
static
int
simple_debug
=
0
;
static
FILE
*
debugstream
=
NULL
;
void
ECPGinit_sqlca
(
struct
sqlca_t
*
sqlca
)
void
ECPGinit_sqlca
(
struct
sqlca_t
*
sqlca
)
{
memcpy
((
char
*
)
sqlca
,
(
char
*
)
&
sqlca_init
,
sizeof
(
struct
sqlca_t
));
}
...
...
@@ -98,25 +99,27 @@ ECPGinit(const struct connection * con, const char *connection_name, const int l
}
#ifdef USE_THREADS
static
void
ecpg_sqlca_key_init
(
void
)
static
void
ecpg_sqlca_key_init
(
void
)
{
pthread_key_create
(
&
sqlca_key
,
NULL
);
}
#endif
struct
sqlca_t
*
ECPGget_sqlca
(
void
)
struct
sqlca_t
*
ECPGget_sqlca
(
void
)
{
#ifdef USE_THREADS
struct
sqlca_t
*
sqlca
;
pthread_once
(
&
sqlca_key_once
,
ecpg_sqlca_key_init
);
sqlca
=
pthread_getspecific
(
&
sqlca_key
);
sqlca
=
pthread_getspecific
(
sqlca_key
);
if
(
sqlca
==
NULL
)
{
sqlca
=
malloc
(
sizeof
(
struct
sqlca_t
));
ECPGinit_sqlca
(
sqlca
);
pthread_setspecific
(
&
sqlca_key
,
sqlca
);
pthread_setspecific
(
sqlca_key
,
sqlca
);
}
return
(
sqlca
);
#else
...
...
src/interfaces/ecpg/include/ecpglib.h
浏览文件 @
a64927f9
...
...
@@ -38,6 +38,9 @@ extern "C"
{
#endif
struct
sqlca_t
;
void
ECPGinit_sqlca
(
struct
sqlca_t
*
sqlca
);
void
ECPGdebug
(
int
,
FILE
*
);
bool
ECPGstatus
(
int
,
const
char
*
);
bool
ECPGsetcommit
(
int
,
const
char
*
,
const
char
*
);
...
...
@@ -49,10 +52,10 @@ bool ECPGdisconnect(int, const char *);
bool
ECPGprepare
(
int
,
char
*
,
char
*
);
bool
ECPGdeallocate
(
int
,
char
*
);
bool
ECPGdeallocate_all
(
int
);
char
*
ECPGprepared_statement
(
char
*
);
char
*
ECPGprepared_statement
(
char
*
);
void
ECPGlog
(
const
char
*
format
,...);
char
*
ECPGerrmsg
(
void
);
char
*
ECPGerrmsg
(
void
);
/* print an error message */
void
sqlprint
(
void
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录