Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
135dea63
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,发现更多精彩内容 >>
提交
135dea63
编写于
8月 10, 2001
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Since PQoidStatus is deprecated, we should probably stop using it in
our own code ...
上级
633b5d56
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
16 deletion
+22
-16
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+9
-6
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+2
-2
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/lib/execute.c
+3
-3
src/interfaces/libpgtcl/pgtclCmds.c
src/interfaces/libpgtcl/pgtclCmds.c
+8
-5
未找到文件。
doc/src/sgml/libpq.sgml
浏览文件 @
135dea63
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.6
5 2001/08/10 14:42:47 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.6
6 2001/08/10 22:50:09 tgl
Exp $
-->
<chapter id="libpq">
...
...
@@ -1073,8 +1073,9 @@ char * PQcmdTuples(const PGresult *res);
<listitem>
<para>
<function>PQoidValue</function>
Returns the object id of the tuple
inserted, if the <acronym>SQL</acronym> command was an INSERT.
Returns the object id of the tuple inserted, if the
<acronym>SQL</acronym> command was an INSERT
that inserted exactly one row into a table that has OIDs.
Otherwise, returns <literal>InvalidOid</literal>.
<synopsis>
Oid PQoidValue(const PGresult *res);
...
...
@@ -1088,9 +1089,11 @@ Oid PQoidValue(const PGresult *res);
<listitem>
<para>
<function>PQoidStatus</function>
Returns a string with the object id of the tuple
inserted, if the <acronym>SQL</acronym> command was an INSERT.
Otherwise, returns an empty string.
Returns a string with the object id of the tuple inserted, if the
<acronym>SQL</acronym> command was an INSERT.
(The string will be "0" if the INSERT did not insert exactly one
row, or if the target table does not have OIDs.) If the command
was not an INSERT, returns an empty string.
<synopsis>
char * PQoidStatus(const PGresult *res);
</synopsis>
...
...
src/bin/pg_dump/pg_dump.c
浏览文件 @
135dea63
...
...
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.2
19 2001/08/10 18:57:38
tgl Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.2
20 2001/08/10 22:50:09
tgl Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
...
...
@@ -4698,7 +4698,7 @@ setMaxOid(Archive *fout)
write_msg
(
NULL
,
"could not insert into pgdump_oid table: %s"
,
PQerrorMessage
(
g_conn
));
exit_nicely
();
}
max_oid
=
atooid
(
PQoidStatus
(
res
)
);
max_oid
=
PQoidValue
(
res
);
if
(
max_oid
==
0
)
{
write_msg
(
NULL
,
"inserted invalid oid
\n
"
);
...
...
src/interfaces/ecpg/lib/execute.c
浏览文件 @
135dea63
...
...
@@ -937,7 +937,7 @@ ECPGexecute(struct statement * stmt)
break
;
case
PGRES_COMMAND_OK
:
status
=
true
;
sqlca
.
sqlerrd
[
1
]
=
atol
(
PQoidStatus
(
results
)
);
sqlca
.
sqlerrd
[
1
]
=
PQoidValue
(
results
);
sqlca
.
sqlerrd
[
2
]
=
atol
(
PQcmdTuples
(
results
));
ECPGlog
(
"ECPGexecute line %d Ok: %s
\n
"
,
stmt
->
lineno
,
PQcmdStatus
(
results
));
if
(
!
sqlca
.
sqlerrd
[
2
]
&&
(
!
strncmp
(
PQcmdStatus
(
results
),
"UPDATE"
,
6
)
...
...
@@ -1032,7 +1032,7 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
*
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
*
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
19 2001/03/22 04:01:19 momjian
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
20 2001/08/10 22:50:10 tgl
Exp $
*/
PGconn
*
ECPG_internal_get_connection
(
char
*
name
);
...
...
@@ -1101,7 +1101,7 @@ execute_descriptor(int lineno, const char *query
break
;
case
PGRES_COMMAND_OK
:
status
=
true
;
sqlca
.
sqlerrd
[
1
]
=
atol
(
PQoidStatus
(
results
)
);
sqlca
.
sqlerrd
[
1
]
=
PQoidValue
(
results
);
sqlca
.
sqlerrd
[
2
]
=
atol
(
PQcmdTuples
(
results
));
ECPGlog
(
"ECPGexecute line %d Ok: %s
\n
"
,
lineno
,
PQcmdStatus
(
results
));
break
;
...
...
src/interfaces/libpgtcl/pgtclCmds.c
浏览文件 @
135dea63
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.5
5 2001/03/22 04:01:23 momjian
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.5
6 2001/08/10 22:50:10 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -574,7 +574,7 @@ Pg_result(ClientData cData, Tcl_Interp *interp, int argc, char *argv[])
return
PgGetConnByResultId
(
interp
,
argv
[
1
]);
else
if
(
strcmp
(
opt
,
"-oid"
)
==
0
)
{
Tcl_AppendResult
(
interp
,
PQoidStatus
(
result
),
0
);
sprintf
(
interp
->
result
,
"%u"
,
PQoidValue
(
result
)
);
return
TCL_OK
;
}
else
if
(
strcmp
(
opt
,
"-clear"
)
==
0
)
...
...
@@ -900,12 +900,15 @@ Pg_execute(ClientData cData, Tcl_Interp *interp, int argc, char *argv[])
/*
* Set the oid variable to the returned oid of an INSERT statement if
* requested (or
an empty string
if it wasn't an INSERT)
* requested (or
0
if it wasn't an INSERT)
*/
if
(
oid_varname
!=
NULL
)
{
if
(
Tcl_SetVar
(
interp
,
oid_varname
,
PQoidStatus
(
result
),
TCL_LEAVE_ERR_MSG
)
!=
TCL_OK
)
char
oid_buf
[
32
];
sprintf
(
oid_buf
,
"%u"
,
PQoidValue
(
result
));
if
(
Tcl_SetVar
(
interp
,
oid_varname
,
oid_buf
,
TCL_LEAVE_ERR_MSG
)
!=
TCL_OK
)
{
PQclear
(
result
);
return
TCL_ERROR
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录