Re: PLPGSQL returning number of rows

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Patrick B <patrickbakerbr(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PLPGSQL returning number of rows
Date: 2016-11-11 00:57:52
Message-ID: CAKFQuwYGa_ADL573z8SAMg5K2pVSPwUTMw1k2=XdwLPts0Q4bA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 10, 2016 at 5:44 PM, Patrick B <patrickbakerbr(at)gmail(dot)com> wrote:

> Hi guys,
>
> I'm writing a simple Plpgsql function to delete some data from different
> tables.
>
> The function starts with a select, and then 2 deletes after that.
>
> How can I return the number of rows that each delete performed?
>
>
​The pl/pgsql chapter named: "Basic Statements - Obtaining the Result
Status" sounds like a good place to look...

Here's a link:

https://www.postgresql.org/docs/9.6/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS

​David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Mamin 2016-11-11 08:55:52 row => text => row
Previous Message Patrick B 2016-11-11 00:44:09 PLPGSQL returning number of rows