2
.\" Title: RELEASE SAVEPOINT
3
.\" Author: The PostgreSQL Global Development Group
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6
.\" Manual: PostgreSQL 9.1beta1 Documentation
7
.\" Source: PostgreSQL 9.1beta1
10
.TH "RELEASE SAVEPOINT" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
22
RELEASE_SAVEPOINT \- destroy a previously defined savepoint
24
.\" savepoints: releasing
28
RELEASE [ SAVEPOINT ] \fIsavepoint_name\fR
33
destroys a savepoint previously defined in the current transaction\&.
35
Destroying a savepoint makes it unavailable as a rollback point, but it has no other user visible behavior\&. It does not undo the effects of commands executed after the savepoint was established\&. (To do that, see
36
ROLLBACK TO SAVEPOINT (\fBROLLBACK_TO_SAVEPOINT\fR(7))\&.) Destroying a savepoint when it is no longer needed allows the system to reclaim some resources earlier than transaction end\&.
39
also destroys all savepoints that were established after the named savepoint was established\&.
44
The name of the savepoint to destroy\&.
48
Specifying a savepoint name that was not previously defined is an error\&.
50
It is not possible to release a savepoint when the transaction is in an aborted state\&.
52
If multiple savepoints have the same name, only the one that was most recently defined is released\&.
55
To establish and later destroy a savepoint:
62
INSERT INTO table1 VALUES (3);
63
SAVEPOINT my_savepoint;
64
INSERT INTO table1 VALUES (4);
65
RELEASE SAVEPOINT my_savepoint;
72
The above transaction will insert both 3 and 4\&.
75
This command conforms to the
77
standard\&. The standard specifies that the key word
81
allows it to be omitted\&.
83
\fBBEGIN\fR(7), \fBCOMMIT\fR(7), \fBROLLBACK\fR(7), ROLLBACK TO SAVEPOINT (\fBROLLBACK_TO_SAVEPOINT\fR(7)), \fBSAVEPOINT\fR(7)