Re: Solution found! was Re: Finding the number of rows affected by UPDATE or INSERT?

From: "Jeff Eckermann" <jeckermann(at)verio(dot)net>
To: "Dr(dot) Evil" <drevil(at)sidereal(dot)kz>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Solution found! was Re: Finding the number of rows affected by UPDATE or INSERT?
Date: 2001-08-30 15:51:36
Message-ID: 00fa01c1316b$b676df70$279c10ac@INTERNAL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Note that a zero rowcount does not necessarily mean an error; it may just
mean that the WHERE clause in your UPDATE was not satisfied. Which may be
equivalent to an error in your particular application: just not as a general
case.

----- Original Message -----
From: "Dr. Evil" <drevil(at)sidereal(dot)kz>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, August 30, 2001 3:05 AM
Subject: [GENERAL] Solution found! was Re: Finding the number of rows
affected by UPDATE or INSERT?

>
> I found out how to do it:
>
> In pl/pgsql:
>
> INT nr;
>
> UPDATE ....
> GET DIAGNOSTICS SELECT PROCESSED INTO nr;
>
> will put the number of rows into nr. It's a very useful feature to
> have this in PG7.1.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-08-30 16:01:09 Re: tuning
Previous Message P.J. "Josh" Rovero 2001-08-30 15:11:13 glacial deletes (long)