At the top of backend/parser/gram.y there's a big comment that says "don't do any database access during the parse phase, just in case we're in the middle of an aborted transaction".

I don't get it.  Why would database access fail during an aborted transaction?  Any changes have to be thrown away at the end of the transaction anyway, right?  Or is it that changes are invalidated as soon as an error occurs?  Is the parser just trying to avoid per-statement triggers after an error occurs?

Can anyone explain?  I've done some simple testing (just out of curiosity) but I can't seem to get anything to break if I always force IsAbortedTransactionBlockState() to return false.

TIA.

         -- Murphy

Reply via email to