Thread: Getting affected rows in pgplsql

Getting affected rows in pgplsql

From
Artacus
Date:
I'm writing some ETL procedures in pgplsql. After each
insert/update/delete, I'd like to log how many rows were affected.

I'm not finding anything on Google. Does anyone know how to get this?

Re: Getting affected rows in pgplsql

From
Blazej
Date:
Maybe this will be helpfull:

http://www.postgresql.org/docs/8.3/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS

Regards,
Blazej Oleszkiewicz

2008/9/4 Artacus <artacus@comcast.net>:
> I'm writing some ETL procedures in pgplsql. After each insert/update/delete,
> I'd like to log how many rows were affected.
>
> I'm not finding anything on Google. Does anyone know how to get this?
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Re: Getting affected rows in pgplsql

From
hubert depesz lubaczewski
Date:
On Thu, Sep 04, 2008 at 02:07:01AM -0700, Artacus wrote:
> I'm writing some ETL procedures in pgplsql. After each
> insert/update/delete, I'd like to log how many rows were affected.

http://www.postgresql.org/docs/current/interactive/plpgsql-statements.html
search for "GET DIAGNOSTICS"

Best regards,

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

Re: Getting affected rows in pgplsql

From
Artacus
Date:
That's just what I needed. Thanks guys!

Artacus

> On Thu, Sep 04, 2008 at 02:07:01AM -0700, Artacus wrote:
>> I'm writing some ETL procedures in pgplsql. After each
>> insert/update/delete, I'd like to log how many rows were affected.
>
> http://www.postgresql.org/docs/current/interactive/plpgsql-statements.html
> search for "GET DIAGNOSTICS"