~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man7/RELEASE_SAVEPOINT.7

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: RELEASE SAVEPOINT
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "RELEASE SAVEPOINT" "7" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
RELEASE_SAVEPOINT \- destroy a previously defined savepoint
 
23
.\" RELEASE SAVEPOINT
 
24
.\" savepoints: releasing
 
25
.SH "SYNOPSIS"
 
26
.sp
 
27
.nf
 
28
RELEASE [ SAVEPOINT ] \fIsavepoint_name\fR
 
29
.fi
 
30
.SH "DESCRIPTION"
 
31
.PP
 
32
RELEASE SAVEPOINT
 
33
destroys a savepoint previously defined in the current transaction\&.
 
34
.PP
 
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\&.
 
37
.PP
 
38
RELEASE SAVEPOINT
 
39
also destroys all savepoints that were established after the named savepoint was established\&.
 
40
.SH "PARAMETERS"
 
41
.PP
 
42
\fIsavepoint_name\fR
 
43
.RS 4
 
44
The name of the savepoint to destroy\&.
 
45
.RE
 
46
.SH "NOTES"
 
47
.PP
 
48
Specifying a savepoint name that was not previously defined is an error\&.
 
49
.PP
 
50
It is not possible to release a savepoint when the transaction is in an aborted state\&.
 
51
.PP
 
52
If multiple savepoints have the same name, only the one that was most recently defined is released\&.
 
53
.SH "EXAMPLES"
 
54
.PP
 
55
To establish and later destroy a savepoint:
 
56
.sp
 
57
.if n \{\
 
58
.RS 4
 
59
.\}
 
60
.nf
 
61
BEGIN;
 
62
    INSERT INTO table1 VALUES (3);
 
63
    SAVEPOINT my_savepoint;
 
64
    INSERT INTO table1 VALUES (4);
 
65
    RELEASE SAVEPOINT my_savepoint;
 
66
COMMIT;
 
67
.fi
 
68
.if n \{\
 
69
.RE
 
70
.\}
 
71
.sp
 
72
The above transaction will insert both 3 and 4\&.
 
73
.SH "COMPATIBILITY"
 
74
.PP
 
75
This command conforms to the
 
76
SQL
 
77
standard\&. The standard specifies that the key word
 
78
SAVEPOINT
 
79
is mandatory, but
 
80
PostgreSQL
 
81
allows it to be omitted\&.
 
82
.SH "SEE ALSO"
 
83
\fBBEGIN\fR(7), \fBCOMMIT\fR(7), \fBROLLBACK\fR(7), ROLLBACK TO SAVEPOINT (\fBROLLBACK_TO_SAVEPOINT\fR(7)), \fBSAVEPOINT\fR(7)