Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.2/8.9.1) with SMTP id UAA92815 for ; Thu, 11 Feb 1999 20:02:06 -0500 (EST) (envelope-from wieck@sapserv.debis.de) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgreSQL.org id m10B768-000EBRC; Fri, 12 Feb 99 02:08 MET Message-Id: From: jwieck@debis.com (Jan Wieck) Subject: Re: [SQL] Plpgsql Language Feature? To: daveh@insightdist.com (David Hartwig) Date: Fri, 12 Feb 1999 02:08:47 +0100 (MET) Cc: pgsql-sql@postgreSQL.org Reply-To: jwieck@debis.com (Jan Wieck) In-Reply-To: <36C359C7.60932427@insightdist.com> from "David Hartwig" at Feb 11, 99 05:29:27 pm X-Mailer: ELM [version 2.4 PL25] Content-Type: text > 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@debis.com (Jan Wieck) #