Re: WIP: push AFTER-trigger execution into ModifyTable node

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: push AFTER-trigger execution into ModifyTable node
Date: 2009-11-01 15:40:49
Message-ID: 6589.1257090049@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> writes:
> I've previously thought about making the CTE aware of the LIMIT,
> similarly to a top-N sort, but I don't think it's worth it.

That approach doesn't lead to a solution because then you could *never*
optimize it. The protocol-level limit option is always present.

It's conceivable that we could have ExecutorEnd forcibly run any DML
CTEs to the end (and fire their triggers?) before shutting down the
executor, but it seems like a kluge.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-11-01 16:12:40 Re: WIP: push AFTER-trigger execution into ModifyTable node
Previous Message Marko Tiikkaja 2009-11-01 15:22:03 Re: WIP: push AFTER-trigger execution into ModifyTable node