From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Returning a bool on DELETE in a proc. |
Date: | 2005-01-19 13:18:47 |
Message-ID: | 20050119141847.J732@hermes.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | John DeSoi | 2005-01-19 14:19:31 | Re: Looking for examples of S/P |
Previous Message | Gary Broadbent | 2005-01-19 12:37:48 | converting Oracle scripts to PostgreSQL |