Robert Haas wrote
>>
>> Issuing
> <command>
> ROLLBACK
> </>
> outside of a transaction
>> block has the sole effect of emitting a warning.
>
> Sure, that sounds OK.
>
> ...Robert
+1 for:
Issuing <command>ROLLBACK</> outside of a transaction
block has no effect except emitting a warning.
In all of these cases we are assuming that the user understands that
emitting a warning means that something is being logged to disk and thus is
causing a resource drain.
I like explicitly saying that issuing these commands is pointless/"has no
effect"; being indirect and saying that the only thing they do is emit a
warning omits any explicit explicit explanation of why. And while I agree
that logging the warning is an effect; but it is not the primary/direct
effect that the user cares about.
I would maybe change the above to:
*Issuing <command>ROLLBACK</> outside of a transaction block has no effect:
thus it emits a warning [to both user and log file].*
I do like "thus" instead of "except" due to the explicit causality link that
is establishes. We emit a warning because what you just did is pointless.
David J.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Suggestion-Issue-warning-when-calling-SET-TRANSACTION-outside-transaction-block-tp5743139p5780825.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.