X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 6948D9FB249 for ; Tue, 18 Jul 2006 14:02:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 13013-02 for ; Tue, 18 Jul 2006 17:02:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from presinet.com (mail.presinet.com [209.53.156.1]) by postgresql.org (Postfix) with ESMTP id 867B59FB24F for ; Tue, 18 Jul 2006 13:44:53 -0300 (ADT) Received: from [10.10.1.151] ([10.10.1.151]) by presinet.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 18 Jul 2006 09:44:16 -0700 Message-ID: <44BD1002.6070505@presinet.com> Date: Tue, 18 Jul 2006 09:44:50 -0700 From: Bricklen Anderson User-Agent: Thunderbird 1.5.0.4 (X11/20060615) MIME-Version: 1.0 To: Aaron Bono CC: pgsql-sql@postgresql.org Subject: Re: hi let me know the solution to this question References: <20060718053442.GA9694@winnie.fuhr.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Jul 2006 16:44:16.0250 (UTC) FILETIME=[6839D5A0:01C6AA89] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/232 X-Sequence-Number: 25806 Aaron Bono wrote: > On 7/18/06, *Michael Fuhr* > wrote: > http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS > > OK, this question got me wondering: is there a way to determine, in a > function/stored procedure, the number of rows that were > inserted/updated/deleted? > I could not find any documentation about getting the count of updates > but when you run the update by itself, PostgreSQL reports the number of > records updated so I have to believe the information is available > somewhere. > > Thanks, > Aaron > Look for the section entitled "36.6.6. Obtaining the Result Status" on the link that Michael Fuhr supplied (above). Is that what you are looking for?