Re: plpgsql and INSERT/UPDATE/DELETE RETURNING
От | Bruce Momjian |
---|---|
Тема | Re: plpgsql and INSERT/UPDATE/DELETE RETURNING |
Дата | |
Msg-id | 200608140230.k7E2U0x28810@momjian.us обсуждение исходный текст |
Ответ на | plpgsql and INSERT/UPDATE/DELETE RETURNING (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > With STRICT: you get an error unless exactly one row is affected. > > This prevents the incomplete-execution problem. > > BTW, some googling indicates that Oracle's equivalent PL/SQL construct > supports only the exactly-one-row case. But they have an alternative, > which is that you can use aggregate functions in the RETURNING list and > get a single-row result that is aggregated across all affected rows. > It's too late to consider implementing that for 8.2, I fear, but I think > maybe we should put it on the TODO list for later. Interesting, an aggregate to combine the rows. Remembering how much trouble/discussion the STRICT was, I am unsure if we should add this to the TODO unless we get someone who likes it. ;-) -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления: