Re: Returning a bool on DELETE in a proc.

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: Returning a bool on DELETE in a proc.
Дата
Msg-id 20050119141847.J732@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: Returning a bool on DELETE in a proc.  (Richard Huxton <dev@archonet.com>)
Список 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 по дате отправления:

Предыдущее
От: RobertD.Stewart@ky.gov
Дата:
Сообщение: Re: Looking for examples of S/P
Следующее
От: John DeSoi
Дата:
Сообщение: Re: Looking for examples of S/P