Re: WIP patch for multiple column assignment in UPDATE

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP patch for multiple column assignment in UPDATE
Date: 2014-06-23 14:51:28
Message-ID: CA+TgmoYNwPsVwMn4oxcbhGNJ9=S-K+VjH8rkwyEaMkH60au09A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 19, 2014 at 9:37 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> I did some tests and It looks so it allows only some form of nested loop.
>
> [ shrug... ] It's a subplan. One evaluation per outer row is what
> people are expecting.

Is it theoretically possible to convert a construct like this to a
semi-join? I notice we don't, even when this new syntax isn't used:

rhaas=# explain select a, (select b from bar where foo.a = bar.a) from foo;
QUERY PLAN
------------------------------------------------------------
Seq Scan on foo (cost=0.00..855145.00 rows=10000 width=4)
SubPlan 1
-> Seq Scan on bar (cost=0.00..85.50 rows=1 width=4)
Filter: (foo.a = a)
Planning time: 0.078 ms

...but I'm wondering if that's an unimplemented feature or if there's
some reason why it's a bad idea.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message rohtodeveloper 2014-06-23 14:51:36 please review source(SQLServer compatible)‏
Previous Message Robert Haas 2014-06-23 14:45:51 Re: replication identifier format