HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/pgsql-14/share/man/man7/END.7
'\" t
.\"     Title: END
.\"    Author: The PostgreSQL Global Development Group
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2025
.\"    Manual: PostgreSQL 14.18 Documentation
.\"    Source: PostgreSQL 14.18
.\"  Language: English
.\"
.TH "END" "7" "2025" "PostgreSQL 14.18" "PostgreSQL 14.18 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"
END \- commit the current transaction
.SH "SYNOPSIS"
.sp
.nf
END [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
.fi
.SH "DESCRIPTION"
.PP
\fBEND\fR
commits the current transaction\&. All changes made by the transaction become visible to others and are guaranteed to be durable if a crash occurs\&. This command is a
PostgreSQL
extension that is equivalent to
\fBCOMMIT\fR\&.
.SH "PARAMETERS"
.PP
WORK
.br
TRANSACTION
.RS 4
Optional key words\&. They have no effect\&.
.RE
.PP
AND CHAIN
.RS 4
If
AND CHAIN
is specified, a new transaction is immediately started with the same transaction characteristics (see
SET TRANSACTION (\fBSET_TRANSACTION\fR(7))) as the just finished one\&. Otherwise, no new transaction is started\&.
.RE
.SH "NOTES"
.PP
Use
\fBROLLBACK\fR
to abort a transaction\&.
.PP
Issuing
\fBEND\fR
when not inside a transaction does no harm, but it will provoke a warning message\&.
.SH "EXAMPLES"
.PP
To commit the current transaction and make all changes permanent:
.sp
.if n \{\
.RS 4
.\}
.nf
END;
.fi
.if n \{\
.RE
.\}
.SH "COMPATIBILITY"
.PP
\fBEND\fR
is a
PostgreSQL
extension that provides functionality equivalent to
\fBCOMMIT\fR, which is specified in the SQL standard\&.
.SH "SEE ALSO"
\fBBEGIN\fR(7), \fBCOMMIT\fR(7), \fBROLLBACK\fR(7)