Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-05-04 Thread Jonah H. Harris
On 3/2/06, Tom Lane [EMAIL PROTECTED] wrote: For example, should it be possible to write: FOR x in DELETE FROM t1 WHERE ... RETURNING t1.x LOOP Seems like you'd want to get there eventually, if not in the first cut. I'd like to get this into the first release of RETURNING for 8.2. I

Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-04-26 Thread Bruce Momjian
Jonah, where are we on this patch? Do you have a version ready for review? --- Jonah H. Harris wrote: On 3/2/06, Jonah H. Harris [EMAIL PROTECTED] wrote: On 3/2/06, Tom Lane [EMAIL PROTECTED] wrote: Jonah H.

Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-03-05 Thread Pavel Stehule
I wonder if we should try to consistently treat an INSERT/UPDATE/DELETE with a RETURNING clause like a SELECT with an equivalent target list. For example, should it be possible to write: FOR x in DELETE FROM t1 WHERE ... RETURNING t1.x LOOP ... END LOOP; Or open a cursor for a

Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-03-03 Thread Jonah H. Harris
On 3/2/06, Jonah H. Harris [EMAIL PROTECTED] wrote: On 3/2/06, Tom Lane [EMAIL PROTECTED] wrote: Jonah H. Harris [EMAIL PROTECTED] writes: INSERT/UPDATE/DELETE seem to work fine in normal operation but there is an error with DELETE RETURNING when used through PL/pgSQL. Probably other places

[PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-03-02 Thread Jonah H. Harris
Patch for core and PL/pgSQL to support the INSERT/UPDATE/DELETE RETURNING syntax in 8.2 INSERT/UPDATE/DELETE seem to work fine in normal operation but there is an error with DELETE RETURNING when used through PL/pgSQL. Here's an example PL/pgSQL test: CREATE SEQUENCE test_id_seq START 1

Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-03-02 Thread Neil Conway
On Thu, 2006-03-02 at 17:51 -0500, Jonah H. Harris wrote: Patch for core and PL/pgSQL to support the INSERT/UPDATE/DELETE RETURNING syntax in 8.2 I wonder if we should try to consistently treat an INSERT/UPDATE/DELETE with a RETURNING clause like a SELECT with an equivalent target list. For

Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-03-02 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: I wonder if we should try to consistently treat an INSERT/UPDATE/DELETE with a RETURNING clause like a SELECT with an equivalent target list. For example, should it be possible to write: FOR x in DELETE FROM t1 WHERE ... RETURNING t1.x LOOP Seems like

Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-03-02 Thread Tom Lane
Jonah H. Harris [EMAIL PROTECTED] writes: INSERT/UPDATE/DELETE seem to work fine in normal operation but there is an error with DELETE RETURNING when used through PL/pgSQL. Probably other places too. I don't see any provision here for ensuring that the variables used in the RETURNING list are

Re: [PATCHES] INS/UPD/DEL RETURNING for 8.2

2006-03-02 Thread Jonah H. Harris
On 3/2/06, Tom Lane [EMAIL PROTECTED] wrote: Jonah H. Harris [EMAIL PROTECTED] writes: INSERT/UPDATE/DELETE seem to work fine in normal operation but there is an error with DELETE RETURNING when used through PL/pgSQL. Probably other places too.I don't see any provision here for ensuringthat the