| From: | jwieck(at)debis(dot)com (Jan Wieck) |
|---|---|
| To: | daveh(at)insightdist(dot)com (David Hartwig) |
| Cc: | pgsql-sql(at)postgreSQL(dot)org |
| Subject: | Re: [SQL] Plpgsql Language Feature? |
| Date: | 1999-02-12 01:08:47 |
| Message-ID: | m10B768-000EBRC@orion.SAPserv.Hamburg.dsh.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
> In the context of a plpgsql script is a possible to access the number of
> rows effected by an UPDATE or DELETE statement? It could be used to
> simplify, and probably improve performance on, many scripts. I would
> like to do something like:
>
> update foo set bar = bar + new.amount where key = new.key;
>
> if ROWS_UPDATED > 0 then
> -- This would be less likely to occur
> insert into foo (key, bar) values (new.key, new.bar);
> end if;
Yes, I think this would be a nice feature. Will take a look
if I can add it before v6.5 BETA starts.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Roberto Joao Lopes Garcia | 1999-02-12 16:20:46 | DEFAULT TEXT 'now' in create table |
| Previous Message | Lawrenzo D'Wolcoto | 1999-02-11 23:29:10 | PSQL SELECT Question. |