Re: why does plperl cache functions using just a bool for is_trigger - Mailing list pgsql-hackers

From Greg Stark
Subject Re: why does plperl cache functions using just a bool for is_trigger
Date
Msg-id AANLkTiksQEPtgnFM1Y1TXqRuJ1viqBXJXVEGstcdY4dC@mail.gmail.com
Whole thread Raw
In response to Re: why does plperl cache functions using just a bool for is_trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Nov 5, 2010 at 2:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> It's not cheap :-( ... but it's *necessary*.  There's no other way to
> get sane behavior.
>
> If the cost annoys you, you should put some effort into making subxact
> start/stop cheaper overall, rather than trying to avoid having one here.

I would be pretty happy even if only the *first* subxact was cheap.
That would take care of 99% of use implicit use cases leaving mostly
only cases where users have explicitly asked for a subxact with a
catch/throw block.

In particular it would cover the psql case of wanting to have a
subxact around every interactive command so the user can hit C-c
without undoing their whole transaction.

--
greg


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to share the result data of separated plan
Next
From: Hitoshi Harada
Date:
Subject: Re: How to share the result data of separated plan