]> begriffs open source - ai-pg/blob - full-docs/man7/START_TRANSACTION.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / START_TRANSACTION.7
1 '\" t
2 .\"     Title: START TRANSACTION
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "START TRANSACTION" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 START_TRANSACTION \- start a transaction block
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 START TRANSACTION [ \fItransaction_mode\fR [, \&.\&.\&.] ]
36
37 where \fItransaction_mode\fR is one of:
38
39     ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
40     READ WRITE | READ ONLY
41     [ NOT ] DEFERRABLE
42 .fi
43 .SH "DESCRIPTION"
44 .PP
45 This command begins a new transaction block\&. If the isolation level, read/write mode, or deferrable mode is specified, the new transaction has those characteristics, as if
46 \fBSET TRANSACTION\fR
47 was executed\&. This is the same as the
48 \fBBEGIN\fR
49 command\&.
50 .SH "PARAMETERS"
51 .PP
52 Refer to
53 SET TRANSACTION (\fBSET_TRANSACTION\fR(7))
54 for information on the meaning of the parameters to this statement\&.
55 .SH "COMPATIBILITY"
56 .PP
57 In the standard, it is not necessary to issue
58 \fBSTART TRANSACTION\fR
59 to start a transaction block: any SQL command implicitly begins a block\&.
60 PostgreSQL\*(Aqs behavior can be seen as implicitly issuing a
61 \fBCOMMIT\fR
62 after each command that does not follow
63 \fBSTART TRANSACTION\fR
64 (or
65 \fBBEGIN\fR), and it is therefore often called
66 \(lqautocommit\(rq\&. Other relational database systems might offer an autocommit feature as a convenience\&.
67 .PP
68 The
69 DEFERRABLE
70 \fItransaction_mode\fR
71 is a
72 PostgreSQL
73 language extension\&.
74 .PP
75 The SQL standard requires commas between successive
76 \fItransaction_modes\fR, but for historical reasons
77 PostgreSQL
78 allows the commas to be omitted\&.
79 .PP
80 See also the compatibility section of
81 SET TRANSACTION (\fBSET_TRANSACTION\fR(7))\&.
82 .SH "SEE ALSO"
83 \fBBEGIN\fR(7), \fBCOMMIT\fR(7), \fBROLLBACK\fR(7), \fBSAVEPOINT\fR(7), SET TRANSACTION (\fBSET_TRANSACTION\fR(7))