Re: Returning a bool on DELETE in a proc.

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Returning a bool on DELETE in a proc.
Дата
Msg-id 41EE4FB2.9080307@archonet.com
обсуждение исходный текст
Ответ на Re: Returning a bool on DELETE in a proc.  (KÖPFERL Robert <robert.koepferl@sonorys.at>)
Ответы Re: Returning a bool on DELETE in a proc.  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Список pgsql-sql
KÖPFERL Robert wrote:
> Thanks, but that was not what I was looking for.
> 
> Seems that I forgot to mention that this function is intended to be written
> in SQL, not in PL/SQL. For the second one I already picked it off the
> fascinating* doc (as Keith did) that GET DIAGONSTIC is the right thing.
> 
> 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). You'll need to use plpgsql (or 
similar) if you want a result status returned.

--  Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: mail + rfc822, rfc2822 + schema
Следующее
От: RobertD.Stewart@ky.gov
Дата:
Сообщение: Re: Looking for examples of S/P