1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +03:00

Issue error on SET outside transaction block in some cases

Issue error for SET LOCAL/CONSTRAINTS/TRANSACTION outside a transaction
block, as they have no effect.

Per suggestion from Morten Hustveit
This commit is contained in:
Bruce Momjian
2013-10-04 13:50:28 -04:00
parent 4655b607f3
commit a54141aebc
7 changed files with 24 additions and 12 deletions

View File

@@ -110,10 +110,9 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
<para>
Specifies that the command takes effect for only the current
transaction. After <command>COMMIT</> or <command>ROLLBACK</>,
the session-level setting takes effect again. Note that
<command>SET LOCAL</> will appear to have no effect if it is
executed outside a <command>BEGIN</> block, since the
transaction will end immediately.
the session-level setting takes effect again.
<productname>PostgreSQL</productname> reports an error if
<command>SET LOCAL</> is used outside a transaction block.
</para>
</listitem>
</varlistentry>