pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: daq <daq@ugyvitelszolgaltato.hu>
To: Marc G. Fournier <scrappy@postgresql.org>
Cc: Pgsql-sql@postgresql.org
Subject: Re: pl/PgSQL: Samples doing UPDATEs ...
Date: Fri, 19 Aug 2005 08:32:43 +0200
Message-ID: <150680430859.20050819083243@ugyvitelszolgaltato.hu> (raw)
In-Reply-To: <20050819023618.K1002@ganymede.hub.org>
References: <20050819023618.K1002@ganymede.hub.org>


MGF> I have an older PostgreSQL book here, that has chapter on pl/PgSQL in it, 
MGF> but no good samples ....

MGF> What I'm looking for is a sample of a function that returns # of rows 
MGF> updated, so that I can make a decision based on that ... does anyone know 
MGF> where I could find such (and others, would be great) online?

...
execute ''Update ...'';
GET DIAGNOSTICS processed_rows = ROW_COUNT;
return processed_roows;
...

See PostgreSQL 7.3 online documentation 19.5.5. Obtaining result
status.
http://www.postgresql.org/docs/7.3/interactive/plpgsql-statements.html


DAQ




view thread (3+ messages)  latest in thread

Message-ID: <150680430859.20050819083243@ugyvitelszolgaltato.hu>
Permalink:  ../150680430859.20050819083243@ugyvitelszolgaltato.hu/
Also on:    postgresql.org/message-id/150680430859.20050819083243@ugyvitelszolgaltato.hu

 · 

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: daq@ugyvitelszolgaltato.hu, scrappy@postgresql.org
  Subject: Re: pl/PgSQL: Samples doing UPDATEs ...
  In-Reply-To: <150680430859.20050819083243@ugyvitelszolgaltato.hu>
  References: <20050819023618.K1002@ganymede.hub.org> <150680430859.20050819083243@ugyvitelszolgaltato.hu>

* 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