Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d1f425

Browse files
committed
Add note that PREPARE TRANSACTION is for transaction managers, not
regular applications. Also add a comment pointing out that tab-complitionfor PREPARE TRANSACTION is missing on purpose.
1 parente7dcfd0 commit1d1f425

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

‎doc/src/sgml/ref/prepare_transaction.sgml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/prepare_transaction.sgml,v 1.9 2009/04/23 00:23:45 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/prepare_transaction.sgml,v 1.10 2010/01/25 18:23:10 heikki Exp $
33
PostgreSQL documentation
44
-->
55

@@ -82,6 +82,15 @@ PREPARE TRANSACTION <replaceable class="PARAMETER">transaction_id</replaceable>
8282
<refsect1>
8383
<title>Notes</title>
8484

85+
<para>
86+
<command>PREPARE TRANSACTION</> is not intended for use in applications
87+
or interactive sessions. It's purpose is to allow an external
88+
transaction manager to perform atomic global transactions across multiple
89+
databases or other transactional resources. Unless you're writing a
90+
transaction manager, you probably shouldn't be using <command>PREPARE
91+
TRANSACTION</>.
92+
</para>
93+
8594
<para>
8695
This command must be used inside a transaction block. Use <xref
8796
linkend="sql-begin" endterm="sql-begin-title"> to start one.

‎src/bin/psql/tab-complete.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2010, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.191 2010/01/22 16:40:19 rhaas Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.192 2010/01/25 18:23:09 heikki Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -1882,6 +1882,11 @@ psql_completion(char *text, int start, int end)
18821882
COMPLETE_WITH_LIST(list_PREPARE);
18831883
}
18841884

1885+
/*
1886+
* PREPARE TRANSACTION is missing on purpose. It's intended for transaction
1887+
* managers, not for manual use in interactive sessions.
1888+
*/
1889+
18851890
/* REASSIGN OWNED BY xxx TO yyy */
18861891
elseif (pg_strcasecmp(prev_wd,"REASSIGN")==0)
18871892
COMPLETE_WITH_CONST("OWNED");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp