Hi,
Please find attached a patch to enable support for temporary tables in
prepared transactions when ON COMMIT DROP has been specified.
The comment in the existing code around this idea reads:
* Don't allow PREPARE TRANSACTION if we've accessed a temporary table in
* this transaction.
[ ... ]
* XXX In principle this could be relaxed to allow some useful special
* cases, such as a temp table created and dropped all within the
* transaction. That seems to require much more bookkeeping though.
In the attached patch I have added this paragraph, and of course the
implementation of it:
* A special case of this situation is using ON COMMIT DROP, where the
* call to PreCommit_on_commit_actions() is then responsible for
* performing the DROP table within the transaction and before we get
* here.
Regards,
--
dim