| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Returning a bool on DELETE in a proc. |
| Date: | 2005-01-19 12:16:50 |
| Message-ID: | 41EE4FB2.9080307@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Achilleus Mantzios | 2005-01-19 12:21:29 | Re: mail + rfc822, rfc2822 + schema |
| Previous Message | KÖPFERL Robert | 2005-01-19 10:24:26 | Re: Returning a bool on DELETE in a proc. |