Re: pl/PgSQL: Samples doing UPDATEs ...

From: daq <daq(at)ugyvitelszolgaltato(dot)hu>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Pgsql-sql(at)postgresql(dot)org
Subject: Re: pl/PgSQL: Samples doing UPDATEs ...
Date: 2005-08-19 06:32:43
Message-ID: 150680430859.20050819083243@ugyvitelszolgaltato.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-08-19 06:33:10 Re: pl/PgSQL: Samples doing UPDATEs ...
Previous Message Marc G. Fournier 2005-08-19 05:38:01 pl/PgSQL: Samples doing UPDATEs ...