Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a620a760
Commit
a620a760
authored
Jan 10, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow BEGIN WORK to specify transaction isolation level, like START
TRANSACTION.
parent
e439fef6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
11 deletions
+41
-11
doc/src/sgml/ref/begin.sgml
doc/src/sgml/ref/begin.sgml
+16
-1
doc/src/sgml/ref/start_transaction.sgml
doc/src/sgml/ref/start_transaction.sgml
+3
-4
src/backend/parser/gram.y
src/backend/parser/gram.y
+3
-3
src/bin/psql/tab-complete.c
src/bin/psql/tab-complete.c
+19
-3
No files found.
doc/src/sgml/ref/begin.sgml
View file @
a620a760
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.2
7 2003/11/29 19:51:38 pgsql
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/begin.sgml,v 1.2
8 2004/01/10 02:21:08 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -21,6 +21,8 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
BEGIN [ WORK | TRANSACTION ]
[ ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } ]
[ READ WRITE | READ ONLY ]
</synopsis>
</refsynopsisdiv>
...
...
@@ -49,6 +51,13 @@ BEGIN [ WORK | TRANSACTION ]
other sessions will be unable to see the intermediate states
wherein not all the related updates have been done.
</para>
<para>
If the isolation level or read/write mode is specified, the new
transaction has those characteristics, as if
<xref linkend="sql-set-transaction" endterm="sql-set-transaction-title">
was executed.
</para>
</refsect1>
<refsect1>
...
...
@@ -65,6 +74,12 @@ BEGIN [ WORK | TRANSACTION ]
</listitem>
</varlistentry>
</variablelist>
<para>
See under <xref linkend="sql-set-transaction"
endterm="sql-set-transaction-title"> about the meaning of the
other parameters.
</para>
</refsect1>
<refsect1>
...
...
doc/src/sgml/ref/start_transaction.sgml
View file @
a620a760
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.
9 2003/11/29 19:51:39 pgsql
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/start_transaction.sgml,v 1.
10 2004/01/10 02:21:08 momjian
Exp $
PostgreSQL documentation
-->
...
...
@@ -33,9 +33,8 @@ START TRANSACTION
This command begins a new transaction. If the isolation level or
read/write mode is specified, the new transaction has those
characteristics, as if <xref linkend="sql-set-transaction"
endterm="sql-set-transaction-title"> was executed. In all other
respects, the behavior of this command is identical to the <xref
linkend="sql-begin" endterm="sql-begin-title"> command.
endterm="sql-set-transaction-title"> was executed. It is the same
as the <xref linkend="sql-begin" endterm="sql-begin-title"> command.
</para>
</refsect1>
...
...
src/backend/parser/gram.y
View file @
a620a760
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.44
3 2004/01/07 18:56:27 neilc
Exp $
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.44
4 2004/01/10 02:21:08 momjian
Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -3674,11 +3674,11 @@ TransactionStmt:
n->options = NIL;
$$ = (Node *)n;
}
| BEGIN_P opt_transaction
| BEGIN_P opt_transaction
transaction_mode_list_or_empty
{
TransactionStmt *n = makeNode(TransactionStmt);
n->kind = TRANS_STMT_BEGIN;
n->options =
NIL
;
n->options =
$3
;
$$ = (Node *)n;
}
| START TRANSACTION transaction_mode_list_or_empty
...
...
src/bin/psql/tab-complete.c
View file @
a620a760
...
...
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.9
7 2003/12/01 22:21:54
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.9
8 2004/01/10 02:21:08
momjian Exp $
*/
/*----------------------------------------------------------------------
...
...
@@ -723,6 +723,18 @@ psql_completion(char *text, int start, int end)
else
if
(
strcasecmp
(
prev2_wd
,
"ANALYZE"
)
==
0
)
COMPLETE_WITH_CONST
(
";"
);
/* BEGIN, COMMIT, ROLLBACK, ABORT, */
else
if
(
strcasecmp
(
prev_wd
,
"BEGIN"
)
==
0
||
strcasecmp
(
prev_wd
,
"END"
)
==
0
||
strcasecmp
(
prev_wd
,
"COMMIT"
)
==
0
||
strcasecmp
(
prev_wd
,
"ROLLBACK"
)
==
0
||
strcasecmp
(
prev_wd
,
"ABORT"
)
==
0
)
{
static
const
char
*
const
list_TRANS
[]
=
{
"WORK"
,
"TRANSACTION"
,
NULL
};
COMPLETE_WITH_LIST
(
list_TRANS
);
}
/* CLUSTER */
/* If the previous word is CLUSTER, produce list of indexes. */
else
if
(
strcasecmp
(
prev_wd
,
"CLUSTER"
)
==
0
)
...
...
@@ -1099,10 +1111,14 @@ psql_completion(char *text, int start, int end)
strcasecmp
(
prev_wd
,
"SHOW"
)
==
0
)
COMPLETE_WITH_LIST
(
pgsql_variables
);
/* Complete "SET TRANSACTION" */
else
if
((
strcasecmp
(
prev2_wd
,
"SET"
)
==
0
&&
strcasecmp
(
prev_wd
,
"TRANSACTION"
)
==
0
)
else
if
((
strcasecmp
(
prev2_wd
,
"SET"
)
==
0
&&
strcasecmp
(
prev_wd
,
"TRANSACTION"
)
==
0
)
||
(
strcasecmp
(
prev2_wd
,
"START"
)
==
0
&&
strcasecmp
(
prev_wd
,
"TRANSACTION"
)
==
0
)
||
(
strcasecmp
(
prev2_wd
,
"BEGIN"
)
==
0
&&
strcasecmp
(
prev_wd
,
"WORK"
)
==
0
)
||
(
strcasecmp
(
prev2_wd
,
"BEGIN"
)
==
0
&&
strcasecmp
(
prev_wd
,
"TRANSACTION"
)
==
0
)
||
(
strcasecmp
(
prev4_wd
,
"SESSION"
)
==
0
&&
strcasecmp
(
prev3_wd
,
"CHARACTERISTICS"
)
==
0
&&
strcasecmp
(
prev2_wd
,
"AS"
)
==
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment