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
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.
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
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
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
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
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
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
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