Re: pl/PgSQL: Samples doing UPDATEs ... - Mailing list pgsql-sql

From daq
Subject Re: pl/PgSQL: Samples doing UPDATEs ...
Date
Msg-id 150680430859.20050819083243@ugyvitelszolgaltato.hu
Whole thread Raw
In response to pl/PgSQL: Samples doing UPDATEs ...  ("Marc G. Fournier" <scrappy@postgresql.org>)
List 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



pgsql-sql by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: pl/PgSQL: Samples doing UPDATEs ...
Next
From: Michael Fuhr
Date:
Subject: Re: pl/PgSQL: Samples doing UPDATEs ...