ok
Direktori : /opt/alt/postgresql11/usr/share/doc/alt-postgresql11-9.2.24/html/ |
Current File : //opt/alt/postgresql11/usr/share/doc/alt-postgresql11-9.2.24/html/sql-start-transaction.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >START TRANSACTION</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 9.2.24 Documentation" HREF="index.html"><LINK REL="UP" TITLE="SQL Commands" HREF="sql-commands.html"><LINK REL="PREVIOUS" TITLE="SHOW" HREF="sql-show.html"><LINK REL="NEXT" TITLE="TRUNCATE" HREF="sql-truncate.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"><META NAME="creation" CONTENT="2017-11-06T22:43:11"></HEAD ><BODY CLASS="REFENTRY" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="5" ALIGN="center" VALIGN="bottom" ><A HREF="index.html" >PostgreSQL 9.2.24 Documentation</A ></TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A TITLE="SHOW" HREF="sql-show.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="sql-commands.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="60%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="20%" ALIGN="right" VALIGN="top" ><A TITLE="TRUNCATE" HREF="sql-truncate.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="SQL-START-TRANSACTION" ></A >START TRANSACTION</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN79287" ></A ><H2 >Name</H2 >START TRANSACTION -- start a transaction block</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN79292" ></A ><H2 >Synopsis</H2 ><PRE CLASS="SYNOPSIS" >START TRANSACTION [ <TT CLASS="REPLACEABLE" ><I >transaction_mode</I ></TT > [, ...] ] <SPAN CLASS="phrase" ><SPAN CLASS="PHRASE" >where <TT CLASS="REPLACEABLE" ><I >transaction_mode</I ></TT > is one of:</SPAN ></SPAN > ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED } READ WRITE | READ ONLY [ NOT ] DEFERRABLE</PRE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN79297" ></A ><H2 >Description</H2 ><P > This command begins a new transaction block. If the isolation level, read/write mode, or deferrable mode is specified, the new transaction has those characteristics, as if <A HREF="sql-set-transaction.html" >SET TRANSACTION</A > was executed. This is the same as the <A HREF="sql-begin.html" >BEGIN</A > command. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN79302" ></A ><H2 >Parameters</H2 ><P > Refer to <A HREF="sql-set-transaction.html" >SET TRANSACTION</A > for information on the meaning of the parameters to this statement. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN79306" ></A ><H2 >Compatibility</H2 ><P > In the standard, it is not necessary to issue <TT CLASS="COMMAND" >START TRANSACTION</TT > to start a transaction block: any SQL command implicitly begins a block. <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN >'s behavior can be seen as implicitly issuing a <TT CLASS="COMMAND" >COMMIT</TT > after each command that does not follow <TT CLASS="COMMAND" >START TRANSACTION</TT > (or <TT CLASS="COMMAND" >BEGIN</TT >), and it is therefore often called <SPAN CLASS="QUOTE" >"autocommit"</SPAN >. Other relational database systems might offer an autocommit feature as a convenience. </P ><P > The <TT CLASS="LITERAL" >DEFERRABLE</TT > <TT CLASS="REPLACEABLE" ><I >transaction_mode</I ></TT > is a <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > language extension. </P ><P > The SQL standard requires commas between successive <TT CLASS="REPLACEABLE" ><I >transaction_modes</I ></TT >, but for historical reasons <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > allows the commas to be omitted. </P ><P > See also the compatibility section of <A HREF="sql-set-transaction.html" >SET TRANSACTION</A >. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN79324" ></A ><H2 >See Also</H2 ><A HREF="sql-begin.html" >BEGIN</A >, <A HREF="sql-commit.html" >COMMIT</A >, <A HREF="sql-rollback.html" >ROLLBACK</A >, <A HREF="sql-savepoint.html" >SAVEPOINT</A >, <A HREF="sql-set-transaction.html" >SET TRANSACTION</A ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="sql-show.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="sql-truncate.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SHOW</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="sql-commands.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >TRUNCATE</TD ></TR ></TABLE ></DIV ></BODY ></HTML >