pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jwieck@debis.com
To: daveh@insightdist.com
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Plpgsql Language Feature?
Date: Fri, 12 Feb 1999 02:08:47 +0100 (MET)
Message-ID: <m10B768-000EBRC@orion.SAPserv.Hamburg.dsh.de> (raw)
In-Reply-To: <36C359C7.60932427@insightdist.com>

> 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) #





view thread (2+ messages)

Message-ID: <m10B768-000EBRC@orion.SAPserv.Hamburg.dsh.de>
Permalink:  ../m10B768-000EBRC@orion.SAPserv.Hamburg.dsh.de/
Also on:    postgresql.org/message-id/m10B768-000EBRC@orion.SAPserv.Hamburg.dsh.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jwieck@debis.com, daveh@insightdist.com
  Subject: Re: [SQL] Plpgsql Language Feature?
  In-Reply-To: <m10B768-000EBRC@orion.SAPserv.Hamburg.dsh.de>
  References: <36C359C7.60932427@insightdist.com> <m10B768-000EBRC@orion.SAPserv.Hamburg.dsh.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox