When in transaction-aborted state, reject Bind message for portals containing
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2005 00:31:59 +0000 (00:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 Nov 2005 00:31:59 +0000 (00:31 +0000)
commit63b23420721cc80a6338d91fb687d1ddf3e3a1a9
treecbd1ad5ff654675f6838c67967f1434244e5c403
parent74f224fad469f9778443a3b256823ed85ffe0399
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