On Tue, Nov 26, 2013 at 01:58:04PM -0300, Alvaro Herrera wrote:
> Bruce Momjian escribió:
> > On Tue, Nov 26, 2013 at 11:22:39AM -0500, Tom Lane wrote:
> 
> > > > Uh, I ended up mentioning "no effect" to highlight it does nothing,
> > > > rather than mention a warning.  Would people prefer I say "warning"?  Or
> > > > should I say "issues a warning because it has no effect" or something? 
> > > > It is easy to change.
> > > 
> > > I'd revert the change Robert highlights above.  ISTM you've changed the
> > > code to match the documentation; why would you then change the docs?
> > 
> > Well, I did it to make it consistent.  The question is what to write for
> > _all_ of the new warnings, including SET.  Do we say "warning", do we
> > say "it has no effect", or do we say both?  The ABORT is a just one case
> > of that.
> 
> Maybe "it emits a warning and otherwise has no effect"?  Emitting a
> warning is certainly not doing nothing; as has been pointed out in the
> SSL renegotiation thread, it might cause the log to fill disk.

OK, doc patch attached.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/doc/src/sgml/ref/abort.sgml b/doc/src/sgml/ref/abort.sgml
new file mode 100644
index f3a2fa8..7c503c6
*** a/doc/src/sgml/ref/abort.sgml
--- b/doc/src/sgml/ref/abort.sgml
*************** ABORT [ WORK | TRANSACTION ]
*** 63,69 ****
    </para>
  
    <para>
!    Issuing <command>ABORT</> outside of a transaction block has no effect.
    </para>
   </refsect1>
  
--- 63,70 ----
    </para>
  
    <para>
!    Issuing <command>ABORT</> outside of a transaction block emits a
!    warning and has no effect.
    </para>
   </refsect1>
  
diff --git a/doc/src/sgml/ref/rollback.sgml b/doc/src/sgml/ref/rollback.sgml
new file mode 100644
index 4f79621..31b8762
*** a/doc/src/sgml/ref/rollback.sgml
--- b/doc/src/sgml/ref/rollback.sgml
*************** ROLLBACK [ WORK | TRANSACTION ]
*** 60,66 ****
  
    <para>
     Issuing <command>ROLLBACK</> outside of a transaction
!    block has no effect.
    </para>
   </refsect1>
  
--- 60,66 ----
  
    <para>
     Issuing <command>ROLLBACK</> outside of a transaction
!    block emits a warning and has no effect.
    </para>
   </refsect1>
  
diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml
new file mode 100644
index 5a84f69..58089e6
*** a/doc/src/sgml/ref/set.sgml
--- b/doc/src/sgml/ref/set.sgml
*************** SET [ SESSION | LOCAL ] TIME ZONE { <rep
*** 110,117 ****
       <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.  This has no effect
!       outside of a transaction block.
       </para>
      </listitem>
     </varlistentry>
--- 110,117 ----
       <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.  Issuing this
!       outside of a transaction block emits a warning and has no effect.
       </para>
      </listitem>
     </varlistentry>
diff --git a/doc/src/sgml/ref/set_constraints.sgml b/doc/src/sgml/ref/set_constraints.sgml
new file mode 100644
index a33190c..3a080ad
*** a/doc/src/sgml/ref/set_constraints.sgml
--- b/doc/src/sgml/ref/set_constraints.sgml
*************** SET CONSTRAINTS { ALL | <replaceable cla
*** 99,105 ****
  
    <para>
     This command only alters the behavior of constraints within the
!    current transaction.  This has no effect outside of a transaction block.
    </para>
   </refsect1>
  
--- 99,106 ----
  
    <para>
     This command only alters the behavior of constraints within the
!    current transaction.  Issuing this outside of a transaction block
!    emits a warning and has no effect.
    </para>
   </refsect1>
  
diff --git a/doc/src/sgml/ref/set_transaction.sgml b/doc/src/sgml/ref/set_transaction.sgml
new file mode 100644
index e90ff4a..2c5bf33
*** a/doc/src/sgml/ref/set_transaction.sgml
--- b/doc/src/sgml/ref/set_transaction.sgml
*************** SET SESSION CHARACTERISTICS AS TRANSACTI
*** 185,191 ****
    <para>
     If <command>SET TRANSACTION</command> is executed without a prior
     <command>START TRANSACTION</command> or <command>BEGIN</command>,
!    it will have no effect.
    </para>
  
    <para>
--- 185,191 ----
    <para>
     If <command>SET TRANSACTION</command> is executed without a prior
     <command>START TRANSACTION</command> or <command>BEGIN</command>,
!    it will emit a warning and have no effect.
    </para>
  
    <para>
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to