'\" t .\" Title: ROLLBACK .\" Author: The PostgreSQL Global Development Group .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 2016 .\" Manual: PostgreSQL 9.5.2 Documentation .\" Source: PostgreSQL 9.5.2 .\" Language: English .\" .TH "ROLLBACK" "5sql" "2016" "PostgreSQL 9.5.2" "PostgreSQL 9.5.2 Documentation" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ROLLBACK \- abort the current transaction .SH "SYNOPSIS" .sp .nf ROLLBACK [ WORK | TRANSACTION ] .fi .SH "DESCRIPTION" .PP \fBROLLBACK\fR rolls back the current transaction and causes all the updates made by the transaction to be discarded\&. .SH "PARAMETERS" .PP WORK .br TRANSACTION .RS 4 Optional key words\&. They have no effect\&. .RE .SH "NOTES" .PP Use \fBCOMMIT\fR(5) to successfully terminate a transaction\&. .PP Issuing \fBROLLBACK\fR outside of a transaction block emits a warning and otherwise has no effect\&. .SH "EXAMPLES" .PP To abort all changes: .sp .if n \{\ .RS 4 .\} .nf ROLLBACK; .fi .if n \{\ .RE .\} .SH "COMPATIBILITY" .PP The SQL standard only specifies the two forms ROLLBACK and ROLLBACK WORK\&. Otherwise, this command is fully conforming\&. .SH "SEE ALSO" \fBBEGIN\fR(5), \fBCOMMIT\fR(5), ROLLBACK TO SAVEPOINT (\fBROLLBACK_TO_SAVEPOINT\fR(5))