[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: SAVEPOINT.7
File is not writable. Editing disabled.
'\" t .\" Title: SAVEPOINT .\" Author: The PostgreSQL Global Development Group .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> .\" Date: 2017-11-06 .\" Manual: PostgreSQL 9.2.24 Documentation .\" Source: PostgreSQL 9.2.24 .\" Language: English .\" .TH "SAVEPOINT" "7" "2017-11-06" "PostgreSQL 9.2.24" "PostgreSQL 9.2.24 Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" SAVEPOINT \- define a new savepoint within the current transaction .\" SAVEPOINT .\" savepoints: defining .SH "SYNOPSIS" .sp .nf SAVEPOINT \fIsavepoint_name\fR .fi .SH "DESCRIPTION" .PP \fBSAVEPOINT\fR establishes a new savepoint within the current transaction\&. .PP A savepoint is a special mark inside a transaction that allows all commands that are executed after it was established to be rolled back, restoring the transaction state to what it was at the time of the savepoint\&. .SH "PARAMETERS" .PP \fIsavepoint_name\fR .RS 4 The name to give to the new savepoint\&. .RE .SH "NOTES" .PP Use ROLLBACK TO SAVEPOINT (\fBROLLBACK_TO_SAVEPOINT\fR(7)) to rollback to a savepoint\&. Use RELEASE SAVEPOINT (\fBRELEASE_SAVEPOINT\fR(7)) to destroy a savepoint, keeping the effects of commands executed after it was established\&. .PP Savepoints can only be established when inside a transaction block\&. There can be multiple savepoints defined within a transaction\&. .SH "EXAMPLES" .PP To establish a savepoint and later undo the effects of all commands executed after it was established: .sp .if n \{\ .RS 4 .\} .nf BEGIN; INSERT INTO table1 VALUES (1); SAVEPOINT my_savepoint; INSERT INTO table1 VALUES (2); ROLLBACK TO SAVEPOINT my_savepoint; INSERT INTO table1 VALUES (3); COMMIT; .fi .if n \{\ .RE .\} .sp The above transaction will insert the values 1 and 3, but not 2\&. .PP To establish and later destroy a savepoint: .sp .if n \{\ .RS 4 .\} .nf BEGIN; INSERT INTO table1 VALUES (3); SAVEPOINT my_savepoint; INSERT INTO table1 VALUES (4); RELEASE SAVEPOINT my_savepoint; COMMIT; .fi .if n \{\ .RE .\} .sp The above transaction will insert both 3 and 4\&. .SH "COMPATIBILITY" .PP SQL requires a savepoint to be destroyed automatically when another savepoint with the same name is established\&. In PostgreSQL, the old savepoint is kept, though only the more recent one will be used when rolling back or releasing\&. (Releasing the newer savepoint with \fBRELEASE SAVEPOINT\fR will cause the older one to again become accessible to \fBROLLBACK TO SAVEPOINT\fR and \fBRELEASE SAVEPOINT\fR\&.) Otherwise, \fBSAVEPOINT\fR is fully SQL conforming\&. .SH "SEE ALSO" \fBBEGIN\fR(7), \fBCOMMIT\fR(7), RELEASE SAVEPOINT (\fBRELEASE_SAVEPOINT\fR(7)), \fBROLLBACK\fR(7), ROLLBACK TO SAVEPOINT (\fBROLLBACK_TO_SAVEPOINT\fR(7))
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 690.78 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A