Here's a patch to:
Throw an error if you try to COMMIT/ROLLBACK PREPARED from a database
other than the one where the transaction was originally prepared.
This needs to be fixed because at least NOTIFY/LISTEN gets confused, and
sends the notification to the database where the commit is done, not the
database where the transaction ran originally. And there might be other
places that get confused as well.
It turned out to be even simpler than I imagined. :)
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com