From: | David Johnston <polobo(at)yahoo(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block |
Date: | 2013-11-29 03:16:08 |
Message-ID: | 1385694968047-5780825.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2013-11-29 03:56:46 | Re: Modify the DECLARE CURSOR command tag depending on the scrollable flag |
Previous Message | Peter Eisentraut | 2013-11-29 03:06:09 | Re: docbook-xsl version for release builds |