Re: rowcount

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Anna Dorofiyenko <anna(dot)dorofiyenko(at)xdrive(dot)com>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: rowcount
Date: 2002-05-01 19:02:03
Message-ID: 3CD03BAB.E41BF3C1@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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

In response to

  • rowcount at 2002-05-01 17:48:26 from Anna Dorofiyenko

Responses

  • Re: rowcount at 2002-05-01 20:42:26 from Samuel J. Sutjiono

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Thomas 2002-05-01 19:52:21 Re: What popular, large commercial websites run
Previous Message elein 2002-05-01 18:58:54 explain and explain analyze with functions