Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
09bb369d
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,发现更多精彩内容 >>
提交
09bb369d
编写于
10月 11, 1996
作者:
B
Bryan Henderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Separate general purpose functions from portal functions so they may be
used in test drivers.
上级
6d70d550
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
111 addition
and
74 deletion
+111
-74
src/backend/libpq/Makefile.inc
src/backend/libpq/Makefile.inc
+5
-3
src/backend/libpq/portal.c
src/backend/libpq/portal.c
+5
-71
src/backend/libpq/util.c
src/backend/libpq/util.c
+101
-0
未找到文件。
src/backend/libpq/Makefile.inc
浏览文件 @
09bb369d
...
...
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/libpq/Attic/Makefile.inc,v 1.
1.1.1 1996/07/09 06:21:30 scrappy
Exp $
# $Header: /cvsroot/pgsql/src/backend/libpq/Attic/Makefile.inc,v 1.
2 1996/10/11 09:47:11 bryanh
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -21,6 +21,8 @@ SRCS_LIBPQ= be-dumpdata.c be-fsstubs.c be-pqexec.c
#
# These files are shared with the frontend library.
#
SRCS_LIBPQ
+=
auth.c pqcomm.c portal.c portalbuf.c pqpacket.c pqsignal.c
SRCS_LIBPQ
+=
auth.c hba.c pqcomm.c portal.c util.c portalbuf.c
\
pqpacket.c pqsignal.c
HEADERS
+=
auth.h be-fsstubs.h libpq-be.h libpq-fs.h libpq.h pqcomm.h pqsignal.h
HEADERS
+=
auth.h hba.h be-fsstubs.h libpq-be.h libpq-fs.h libpq.h
\
pqcomm.h pqsignal.h
src/backend/libpq/portal.c
浏览文件 @
09bb369d
...
...
@@ -7,17 +7,11 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.
1.1.1 1996/07/09 06:21:30 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.
2 1996/10/11 09:47:13 bryanh
Exp $
*
*-------------------------------------------------------------------------
*/
/*
* UTILITY ROUTINES
* pqdebug - send a string to the debugging output port
* pqdebug2 - send two strings to stdout
* PQtrace - turn on pqdebug() tracing
* PQuntrace - turn off pqdebug() tracing
*
* INTERFACE ROUTINES
* PQnportals - Return the number of open portals.
* PQpnames - Return all the portal names
...
...
@@ -70,18 +64,11 @@
#include "utils/exc.h"
#include "utils/palloc.h"
/* ----------------
* exceptions
* ----------------
*/
Exception
MemoryError
=
{
"Memory Allocation Error"
};
Exception
PortalError
=
{
"Invalid arguments to portal functions"
};
Exception
PostquelError
=
{
"Sql Error"
};
Exception
ProtocolError
=
{
"Protocol Error"
};
char
PQerrormsg
[
ERROR_MSG_LENGTH
];
int
PQtracep
=
0
;
/* 1 to print out debugging messages */
FILE
*
debug_port
=
(
FILE
*
)
NULL
;
/* ----------------------------------------------------------------
* Helper routines for PQ portal interface routines below
* ----------------------------------------------------------------
*/
static
int
in_range
(
char
*
msg
,
int
value
,
int
min
,
int
max
)
...
...
@@ -108,59 +95,6 @@ valid_pointer(char *msg, void *ptr)
return
(
1
);
}
/* ----------------------------------------------------------------
* PQ utility routines
* ----------------------------------------------------------------
*/
void
pqdebug
(
char
*
target
,
char
*
msg
)
{
if
(
!
target
)
return
;
if
(
PQtracep
)
{
/*
* if nothing else was suggested default to stdout
*/
if
(
!
debug_port
)
debug_port
=
stdout
;
fprintf
(
debug_port
,
target
,
msg
);
fprintf
(
debug_port
,
"
\n
"
);
}
}
void
pqdebug2
(
char
*
target
,
char
*
msg1
,
char
*
msg2
)
{
if
(
!
target
)
return
;
if
(
PQtracep
)
{
/*
* if nothing else was suggested default to stdout
*/
if
(
!
debug_port
)
debug_port
=
stdout
;
fprintf
(
debug_port
,
target
,
msg1
,
msg2
);
fprintf
(
debug_port
,
"
\n
"
);
}
}
/* --------------------------------
* PQtrace() / PQuntrace()
* --------------------------------
*/
void
PQtrace
()
{
PQtracep
=
1
;
}
void
PQuntrace
()
{
PQtracep
=
0
;
}
/* ----------------------------------------------------------------
* PQ portal interface routines
...
...
src/backend/libpq/util.c
0 → 100644
浏览文件 @
09bb369d
/*-------------------------------------------------------------------------
*
* util.c--
* general routines for libpq backend
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/util.c,v 1.1 1996/10/11 09:47:14 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
/*
* UTILITY ROUTINES
* pqdebug - send a string to the debugging output port
* pqdebug2 - send two strings to stdout
* PQtrace - turn on pqdebug() tracing
* PQuntrace - turn off pqdebug() tracing
*/
#include <stdio.h>
/* for sprintf() */
#include <string.h>
#include "c.h"
#include "lib/dllist.h"
#include "libpq/libpq.h"
/* where the declarations go */
#include "utils/exc.h"
#include "utils/palloc.h"
/* ----------------
* exceptions
* ----------------
*/
Exception
MemoryError
=
{
"Memory Allocation Error"
};
Exception
PortalError
=
{
"Invalid arguments to portal functions"
};
Exception
PostquelError
=
{
"Sql Error"
};
Exception
ProtocolError
=
{
"Protocol Error"
};
char
PQerrormsg
[
ERROR_MSG_LENGTH
];
int
PQtracep
=
0
;
/* 1 to print out debugging messages */
FILE
*
debug_port
=
(
FILE
*
)
NULL
;
/* ----------------------------------------------------------------
* PQ utility routines
* ----------------------------------------------------------------
*/
void
pqdebug
(
char
*
target
,
char
*
msg
)
{
if
(
!
target
)
return
;
if
(
PQtracep
)
{
/*
* if nothing else was suggested default to stdout
*/
if
(
!
debug_port
)
debug_port
=
stdout
;
fprintf
(
debug_port
,
target
,
msg
);
fprintf
(
debug_port
,
"
\n
"
);
}
}
void
pqdebug2
(
char
*
target
,
char
*
msg1
,
char
*
msg2
)
{
if
(
!
target
)
return
;
if
(
PQtracep
)
{
/*
* if nothing else was suggested default to stdout
*/
if
(
!
debug_port
)
debug_port
=
stdout
;
fprintf
(
debug_port
,
target
,
msg1
,
msg2
);
fprintf
(
debug_port
,
"
\n
"
);
}
}
/* --------------------------------
* PQtrace() / PQuntrace()
* --------------------------------
*/
void
PQtrace
()
{
PQtracep
=
1
;
}
void
PQuntrace
()
{
PQtracep
=
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录