Dumb question about parser vs. parse analyzer

From: murphy pope <pope_murphy(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Dumb question about parser vs. parse analyzer
Date: 2004-07-19 21:41:30
Message-ID: 1090273290.5104.77.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-07-19 21:50:05 Re: Why we really need timelines *now* in PITR
Previous Message Bruce Momjian 2004-07-19 21:38:17 Re: fix schema ownership on first connection preliminary patch