Skip site navigation (1) Skip section navigation (2)

UPDATE using sub selects

From: NikhilS <nikkhils(at)gmail(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: UPDATE using sub selects
Date: 2007-04-11 08:26:22
Message-ID: (view raw or whole thread)
Lists: pgsql-patches

As per discussion on -hackers, a patch which allows updates to use
subselects is attached with this mail.

As per discussion with Tom, I have adopted the following approach:

* Introduce ROWEXPR_SUBLINK type for subqueries that allows multiple column
* Populate the targetList with PARAM_SUBLINK entries dependent on the
* Modify the targets in-place into PARAM_EXEC entries in the make_subplan

The above does not require any kluges in the targetList processing code path
at all.

UPDATEs seem to work fine using subselects with this patch. I have modified
the update.sql regression test to include possible variations .

No documentation changes are present in this patch.
Feedback, comments appreciated.


Attachment: updates_using_subselects.patch
Description: text/x-patch (37.2 KB)


pgsql-patches by date

Next:From: Tom LaneDate: 2007-04-11 14:11:33
Subject: Re: [HACKERS] Fix mdsync never-ending loop problem
Previous:From: Pavan DeolaseeDate: 2007-04-11 08:13:43
Subject: Re: [HACKERS] CIC and deadlocks

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group