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

From KÖPFERL Robert
Subject Returning a bool on DELETE in a proc.
Date
Msg-id ED4E30DD9C43D5118DFB00508BBBA76EB16564@neptun.sonorys.at
Whole thread Raw
Responses Re: Returning a bool on DELETE in a proc.
Re: Returning a bool on DELETE in a proc.
List pgsql-sql
Hi,

I'm currently writing a function which encapsulates a delete and should
return a bool as indicator for success.

I tried:
    DELETE FROM "TariffDetails" WHERE "TariffId"=$1 and "BNumberPrefix"=$2;    SELECT TRUE;

but this makes me not happy.
How can I distingruish wehter DELETE affected 0 or more rows and return that
while DELETE is not capable of returning any value?

And is the whole function executed if the DELETE fails or will it stop
bevore the select?

I had a read throu SQL-functions while nothing matched me.


pgsql-sql by date:

Previous
From: KÖPFERL Robert
Date:
Subject: Re: query configuration for validate empty quote to zero
Next
From: "Keith Worthington"
Date:
Subject: Re: Returning a bool on DELETE in a proc.