Thread: Getting affected rows in pgplsql
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?
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 >
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
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"