Re: UPDATE using sub selects - Mailing list pgsql-hackers

From NikhilS
Subject Re: UPDATE using sub selects
Date
Msg-id d3c4af540703160755y32f9cbc4we8f0b34aa98a141e@mail.gmail.com
Whole thread Raw
In response to Re: UPDATE using sub selects  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: UPDATE using sub selects  (NikhilS <nikkhils@gmail.com>)
List pgsql-hackers
Hi,

On 3/16/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
NikhilS <nikkhils@gmail.com> writes:
> To allow both of the above to hold, I think the subselect will have to be
> treated like a EXPR_SUBLINK subquery. I was wondering if we have a similar
> mechanism for plain selects/subselects to check and restrict their output to
> a single row.

No.  Offhand I think you'd either need to relax EXPR_SUBLINK to allow
multiple output columns, or invent a ROW_SUBLINK SubLinkType that is
just like EXPR_SUBLINK except for allowing multiple output columns.
The latter would probably be less likely to break other things...

Yeah, was looking at EXPR_SUBLINK and its single column use case and drove to the same conclusion that inventing a new sublink type would be better too. It is indeed becoming a "not so simple and narrow fix" as you had mentioned earlier in your first response :)

Regards,
Nikhils
--
EnterpriseDB               http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Lock table in non-volatile functions
Next
From: "Florian G. Pflug"
Date:
Subject: Re: tsearch_core for inclusion