I wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Hmm, I'm worried that may be an API contract violation.
> Indeed it is. You could get away with it if you check the
> EXEC_FLAG_EXPLAIN_ONLY flag before doing anything with visible
> side-effects, but it's still pretty ugly.
Actually, there's another problem there. What of UPDATE or DELETE with a
LIMIT clause, which is something that seems to be coming down the pike:
https://commitfest.postgresql.org/action/patch_view?id=1550
regards, tom lane