Re: WIP: push AFTER-trigger execution into ModifyTable node - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: WIP: push AFTER-trigger execution into ModifyTable node
Date
Msg-id 4AEDA79B.8050508@cs.helsinki.fi
Whole thread Raw
In response to Re: WIP: push AFTER-trigger execution into ModifyTable node  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: push AFTER-trigger execution into ModifyTable node
List pgsql-hackers
Tom Lane wrote:
> However, this still doesn't address the problem of what happens when the
> top-level select fails to read all of the CTE output (because it has a
> LIMIT, or the client doesn't read all the output of a portal, etc etc).
> Partially executing an update in such cases is no good.

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.  If we have
a LIMIT, we could just fall back to the statement-at-the-time execution.
I'm not sure what all cases you mean with "the client doesn't read all
the output of a portal", but at least for cursors we'd have to first
execute ModifyTable nodes.


Regards,
Marko Tiikkaja




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: [PATCH] tsearch parser inefficiency if text includes urls or emails
Next
From: Tom Lane
Date:
Subject: Re: WIP: push AFTER-trigger execution into ModifyTable node