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

Re: UPDATE using sub selects

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: NikhilS <nikkhils(at)gmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: UPDATE using sub selects
Date: 2007-04-27 01:06:28
Message-ID: 200704270106.l3R16Sa21032@momjian.us (view raw or flat)
Thread:
Lists: pgsql-patches
This has been saved for the 8.4 release:

	http://momjian.postgresql.org/cgi-bin/pgpatches_hold

---------------------------------------------------------------------------

NikhilS wrote:
> Hi,
> 
> 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
> outputs.
> * Populate the targetList with PARAM_SUBLINK entries dependent on the
> subselects.
> * Modify the targets in-place into PARAM_EXEC entries in the make_subplan
> phase.
> 
> 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.
> 
> Regards,
> Nikhils
> -- 
> EnterpriseDB               http://www.enterprisedb.com

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>                http://archives.postgresql.org

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2007-04-27 01:12:08
Subject: Re: CREATE TABLE LIKE INCLUDING INDEXES support
Previous:From: Bruce MomjianDate: 2007-04-27 01:05:51
Subject: Re: [HACKERS] CIC and deadlocks

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