UPDATE tuples with a sub-select

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема UPDATE tuples with a sub-select
Дата
Msg-id gf14f9$tin$1@ger.gmane.org
обсуждение исходный текст
Ответы Re: UPDATE tuples with a sub-select  (Gerhard Heift <ml-postgresql-20081012-3518@gheift.de>)
Re: UPDATE tuples with a sub-select  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: UPDATE tuples with a sub-select  (Gerhard Heift <gheift@kawo1.rwth-aachen.de>)
Список pgsql-general
Hi,

are there any plans to support updating a tuple using a sub-select in one of the future versions.

e.g, something like:

UPDATE report_table
   SET (order_count,order_value) = (SELECT count(*), sum(amount)
                                    FROM order o
                                    WHERE o.customer_id = report_table.customer_id);

I know it's currently not possible (so we need to revert to two sub-selects) but I was wondering if this somewhere on
the"roadmap" 

Regards
Thomas

В списке pgsql-general по дате отправления:

Предыдущее
От: Gerhard Heift
Дата:
Сообщение: restruct cash table
Следующее
От: Michelle Konzack
Дата:
Сообщение: Re: Equivalent for AUTOINCREMENT?