When in transaction-aborted state, reject Bind message for portals containing
authorTom Lane <[email protected]>
Thu, 10 Nov 2005 00:31:49 +0000 (00:31 +0000)
committerTom Lane <[email protected]>
Thu, 10 Nov 2005 00:31:49 +0000 (00:31 +0000)
commit7948ac46bd42fe24542c92ec085fc9e12523b171
tree156ddb4c7c1c394b38cbdaae456830ad1cb1b244
parentb3767eb9a16b575cbc072dfc3626529f5b892998
When in transaction-aborted state, reject Bind message for portals containing
anything but transaction-exiting commands (ROLLBACK etc).  We already rejected
Parse and Execute in such cases, so there seems little point in allowing Bind.
This prevents at least an Assert failure, and probably worse things, since
there's a lot of infrastructure that doesn't work when not in a live
transaction.  We can also simplify the Bind logic a bit by rejecting messages
with a nonzero number of parameters, instead of the former kluge to silently
substitute NULL for each parameter.  Per bug #2033 from Joel Stevenson.
src/backend/tcop/postgres.c