aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-07-20 12:44:37 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2013-07-20 12:44:53 -0400
commit15b9bdf4d46e5b2858c7666dd4a39040aa12e668 (patch)
treef461375dd87693596df4935b2f5a5dc27a289164 /src/backend/utils/adt/ruleutils.c
parentef8321a57d38c00592614a6d8f0872a721d301c3 (diff)
downloadpostgresql-15b9bdf4d46e5b2858c7666dd4a39040aa12e668.tar.gz
postgresql-15b9bdf4d46e5b2858c7666dd4a39040aa12e668.zip
Fix error handling in PLy_spi_execute_fetch_result().
If an error is thrown out of the datatype I/O functions called by this function, we need to do subtransaction cleanup, which the previous coding entirely failed to do. Fortunately, both existing callers of this function already have proper cleanup logic, so re-throwing the exception is enough. Also, postpone creation of the resultset tupdesc until after the I/O conversions are complete, so that we won't leak memory in TopMemoryContext when such an error happens.
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
0 files changed, 0 insertions, 0 deletions