Re: Returning a bool on DELETE in a proc. - Mailing list pgsql-sql

From Karsten Hilbert
Subject Re: Returning a bool on DELETE in a proc.
Date
Msg-id 20050119141847.J732@hermes.hilbert.loc
Whole thread Raw
In response to Re: Returning a bool on DELETE in a proc.  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
> >So what variable/function is the correct SQL-equivalent to ROW_COUNT and 
> >can it be used in the following statement ?
> >like DELETE...; SELECT (ROW_COUNT<>0); to return a bool value?
> 
> SQL doesn't support that (although I suppose it could be made to with 
> some pg_rows_affected() function).
If someone could only post that pg_rows_affected() function -
this would end all further requests for "row number in result
set" inquiries with the simple advice "use pg_rows_affected()
and join that with an integer table".

I'd know a bunch of uses right off the top of my head.

I suppose it ain't hard at all but my C skills are way to
limited to try anything like that. My understanding, too,
likely.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


pgsql-sql by date:

Previous
From: RobertD.Stewart@ky.gov
Date:
Subject: Re: Looking for examples of S/P
Next
From: John DeSoi
Date:
Subject: Re: Looking for examples of S/P