From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: plpgsql and INSERT/UPDATE/DELETE RETURNING |
Date: | 2006-08-14 02:30:00 |
Message-ID: | 200608140230.k7E2U0x28810@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Satoshi Nagayasu | 2006-08-14 02:33:19 | Re: pgstattuple extension for indexes |
Previous Message | Bruce Momjian | 2006-08-14 02:27:37 | Re: [PATCHES] Custom variable class segmentation fault |