| From: | <drevil(at)sidereal(dot)kz> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: How to tell if that UPDATE worked? |
| Date: | 2001-01-12 04:20:59 |
| Message-ID: | 20010112042059.2586.qmail@mailhost.sidereal.kz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
> Do a
>
> GET DIAGNOSTICS SELECT PROCESSED INTO <int4_variable>;
>
> directly after an INSERT, UPDATE or DELETE statement and
> you'll know how many rows have been hit.
>
> Also you can get the OID of an inserted row with
>
> GET DIAGNOSTICS SELECT RESULT INTO <int4_variable>;
Thanks for the tip. That is exactly what I needed. plpgsql is a
painful language in many ways, but it is also very straightforward, so
I'm writing the bulk of my project in it.
> Er - is this another added feature where we're still lacking
> documentation?
As pointed out by Tom in a subsequent email, there is one cryptic line
in there, which is probably why I overlooked it...
Thanks for your help
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dan Moschuk | 2001-01-12 04:34:09 | Re: exit status 26 |
| Previous Message | drevil | 2001-01-12 04:15:20 | Re: Found a bug in the procedural languages code relating to LIMIT 1 |