Re: Using results from DELETE ... RETURNING

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Joshua Tolley <eggyknap(at)gmail(dot)com>, Shak <sshaikh(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Using results from DELETE ... RETURNING
Date: 2009-06-07 04:29:56
Message-ID: 5603.1244348996@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

David Fetter <david(at)fetter(dot)org> writes:
> Would it be super-complicated to do this with CTEs for 8.5? They seem to
> have sane properties like getting executed exactly once.

Hmm, interesting thought. The knock against doing RETURNING as an
ordinary subquery is exactly that you can't disentangle it very well
from the upper query (and thus, it's hard to figure out when to fire
triggers, to take just one problem). But we've defined CTEs much more
restrictively, so maybe the problems can be solved in that context.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2009-06-07 05:38:58 Re: limit table to one row
Previous Message David Fetter 2009-06-07 04:25:17 Re: Using results from DELETE ... RETURNING

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolas Barbier 2009-06-07 07:26:29 Re: PostgreSQL Developer meeting minutes up
Previous Message David Fetter 2009-06-07 04:25:17 Re: Using results from DELETE ... RETURNING