Re: [HACKERS] Expanding DELETE/UPDATE returning

2007-03-02 Thread Bruno Wolff III
On Tue, Feb 27, 2007 at 15:07:06 +0100, Florian G. Pflug [EMAIL PROTECTED] wrote: select * from t1, (delete from t2 returning t2.t1_id) where t1.id = t2.t1_id limit 1 ; I for my part couldn't even say what I'd expect that query to do. I would expect it to delete all rows from t2 but

Re: [HACKERS] Expanding DELETE/UPDATE returning

2007-02-27 Thread Florian G. Pflug
David Fetter wrote: On Mon, Feb 26, 2007 at 11:14:01PM -0500, Tom Lane wrote: Rusty Conover [EMAIL PROTECTED] writes: Or allow delete and update to be used in sub-queries? That's been discussed but the implementation effort seems far from trivial. One big problem is that a sub-query can

[HACKERS] Expanding DELETE/UPDATE returning

2007-02-26 Thread Rusty Conover
Hi, I didn't see this on the TODO list, but if it is my apologies. Is it in the cards to expand the functionality of DELETE/UPDATE returning to be able to sort the output of the rows returned? Or allow delete and update to be used in sub-queries? Some examples: create temp table t1

Re: [HACKERS] Expanding DELETE/UPDATE returning

2007-02-26 Thread Tom Lane
Rusty Conover [EMAIL PROTECTED] writes: I didn't see this on the TODO list, but if it is my apologies. Is it in the cards to expand the functionality of DELETE/UPDATE returning to be able to sort the output of the rows returned? No. Or allow delete and update to be used in

Re: [HACKERS] Expanding DELETE/UPDATE returning

2007-02-26 Thread David Fetter
On Mon, Feb 26, 2007 at 11:14:01PM -0500, Tom Lane wrote: Rusty Conover [EMAIL PROTECTED] writes: I didn't see this on the TODO list, but if it is my apologies. Is it in the cards to expand the functionality of DELETE/UPDATE returning to be able to sort the output of the rows returned?

Re: [HACKERS] Expanding DELETE/UPDATE returning

2007-02-26 Thread Jim C. Nasby
On Mon, Feb 26, 2007 at 11:14:01PM -0500, Tom Lane wrote: Rusty Conover [EMAIL PROTECTED] writes: I didn't see this on the TODO list, but if it is my apologies. Is it in the cards to expand the functionality of DELETE/UPDATE returning to be able to sort the output of the rows returned?

Re: [HACKERS] Expanding DELETE/UPDATE returning

2007-02-26 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: On Mon, Feb 26, 2007 at 11:14:01PM -0500, Tom Lane wrote: Rusty Conover [EMAIL PROTECTED] writes: Or allow delete and update to be used in sub-queries? That's been discussed but the implementation effort seems far from trivial. One big problem is that