Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
8670e358
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,发现更多精彩内容 >>
提交
8670e358
编写于
3月 24, 2003
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prevent multiple queries in a single string into a single transaction
when autocommit is off, and document grouping when autocommit is on.
上级
d258ba01
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
10 deletion
+14
-10
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+3
-6
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+6
-1
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+5
-3
未找到文件。
doc/src/sgml/libpq.sgml
浏览文件 @
8670e358
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.11
4 2003/03/22 03:29:05
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.11
5 2003/03/24 18:33:52
momjian Exp $
-->
<chapter id="libpq">
...
...
@@ -857,11 +857,8 @@ returned by the server.
maintain the <structname>PGresult</structname> abstraction. Use the accessor functions below to get
at the contents of <structname>PGresult</structname>. Avoid directly referencing the fields of the
<structname>PGresult</structname> structure because they are subject to change in the future.
(Beginning in <productname>PostgreSQL</productname> 6.4, the
definition of <type>struct</> behind <structname>PGresult</> is not even provided in <filename>libpq-fe.h</>. If you
have old code that accesses <structname>PGresult</structname> fields directly, you can keep using it
by including <filename>libpq-int.h</filename> too, but you are encouraged to fix the code
soon.)
If <quote>autocommit</quote> is on, multiple queries sent in a single
function call are processed in a single transaction.
</para>
<variablelist>
...
...
doc/src/sgml/ref/psql-ref.sgml
浏览文件 @
8670e358
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.8
6 2003/03/24 14:32:51 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.8
7 2003/03/24 18:33:52 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -86,6 +86,11 @@ PostgreSQL documentation
meta-commands. To achieve that, you could pipe the string into
<application>psql</application>, like this: <literal>echo "\x \\
select * from foo;" | psql</literal>.
</para>
<para>
If <quote>autocommit</quote> is on, multiple queries in a single
string are processed in a single transaction.
</para>
</listitem>
</varlistentry>
...
...
src/backend/tcop/postgres.c
浏览文件 @
8670e358
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.3
19 2003/03/22 04:23:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.3
20 2003/03/24 18:33:52
momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -83,6 +83,8 @@ sigjmp_buf Warn_restart;
bool
Warn_restart_ready
=
false
;
bool
InError
=
false
;
extern
bool
autocommit
;
static
bool
EchoQuery
=
false
;
/* default don't echo */
/*
...
...
@@ -893,7 +895,7 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
* historical Postgres behavior, we do not force a transaction
* boundary between queries appearing in a single query string.
*/
if
(
lnext
(
parsetree_item
)
==
NIL
&&
xact_started
)
if
(
(
lnext
(
parsetree_item
)
==
NIL
||
!
autocommit
)
&&
xact_started
)
{
finish_xact_command
(
false
);
xact_started
=
false
;
...
...
@@ -1793,7 +1795,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.3
19 $ $Date: 2003/03/22 04:23:34
$
\n
"
);
puts
(
"$Revision: 1.3
20 $ $Date: 2003/03/24 18:33:52
$
\n
"
);
}
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录