Re: How to retrieve number of rows affected, in an after statement trigger?

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to retrieve number of rows affected, in an after statement trigger?
Date: 2007-07-07 11:47:32
Message-ID: da20b0edc78fe62ebeb55da2e21e1439@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> Is it possible to retrieve information about how many rows were
> changed/inserted in a table that fired after statement trigger?

Not directly, but you can store the information from row-level
triggers and gather it at the end. See this plperl example:

http://people.planetpostgresql.org/greg/index.php?/archives/2007/05/30.html

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200707070745
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFGj30hvJuQZxSWSsgRA9iXAJ0aiS5oVbYxcY69yY0zvig4G4eBTwCdE5ON
EYV77TeTYNSRt46fsZDfkTI=
=C7mD
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carmen Martinez 2007-07-07 12:16:24 catalog location
Previous Message Leon Mergen 2007-07-07 10:58:02 Unable to get postgres running after long time no vacuum