Обсуждение: Return num of deleted rows from function

Поиск
Список
Период
Сортировка

Return num of deleted rows from function

От
"Ben-Nes Michael"
Дата:
Hi All

How can I RETURN from within a function the number of deleted rows ?

like select into var delete from bla bla .... <- can work, or something
similar ?

Thanks in Advance



Re: Return num of deleted rows from function

От
Tom Lane
Дата:
"Ben-Nes Michael" <miki@canaan.co.il> writes:
> How can I RETURN from within a function the number of deleted rows ?

In plpgsql, use GET DIAGNOSTICS - see bottom of
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/plpgsql-statements.html

            regards, tom lane