]> granicus.if.org Git - postgresql/commit
When in transaction-aborted state, reject Bind message for portals containing
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2005 00:31:34 +0000 (00:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2005 00:31:34 +0000 (00:31 +0000)
commitda4e00bf3798e2cac0dd64b242b6344846ce65e7
tree08ebe6d76cd811c72dfec94d65080ba8c5fc120d
parent0dd92d56b58b6b80d2c0b34aa25e8fa8cd922c5d
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