UPDATE using sub selects
От
NikhilS
Тема
UPDATE using sub selects
Дата
Msg-id
d3c4af540704110126o5b6c9c79na40ae4d4c6236d06@mail.gmail.com
Список
Дерево обсуждения
UPDATE using sub selects NikhilS <nikkhils@gmail.com>
Re: UPDATE using sub selects Bruce Momjian <bruce@momjian.us>
Re: UPDATE using sub selects Bruce Momjian <bruce@momjian.us>
Re: UPDATE using sub selects Tom Lane <tgl@sss.pgh.pa.us>
Re: UPDATE using sub selects Tom Lane <tgl@sss.pgh.pa.us>
Re: UPDATE using sub selects NikhilS <nikkhils@gmail.com>
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
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
В списке pgsql-patches по дате отправления