> Anna Dorofiyenko wrote:
>
> Hello, list.
> How can I get in PL/pgSQL number of rows affected by insert/update?
>
> I'm looking to do something like:
> insert into...
> If rowcount>0
> then ...
I believe its GET DIAGNOSTICS:
GET DIAGNOSTICS rowcount = ROW_COUNT;
The docs seem pretty paltry on the subject, but here's a link:
http://www.postgresql.org/idocs/index.php?plpgsql-statements.html
>
> Thank you.
> Anna