Re: Delete function

From: Richard Huxton <dev(at)archonet(dot)com>
To: Secrétariat <ets(at)rolland-fr(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Delete function
Date: 2004-12-06 14:01:53
Message-ID: 41B46651.7050409@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Secrétariat wrote:
> Hello !
>
> I create a delete function :
> CREATE FUNCTION delalpha(varchar, integer) RETURNS boolean
> AS 'DELETE FROM public.params WHERE soc = $1 AND numpar = $2 ;
> SELECT TRUE ;'
> LANGUAGE sql ;
> Is there a way to return the number of deleted row ?
> Thanks.

If you rewrote the function in plpgsql, you could use "GET DIAGNOSTICS"
- see the manual plpgsql/Obtaining the result status.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Esposito 2004-12-06 14:08:02 Performance tuning on RedHat Enterprise Linux 3
Previous Message Pierre-Frédéric Caillaud 2004-12-06 13:46:47 Re: select single entry and its neighbours using direct-acess to index?