Re: How to retrieve number of rows affected, in an after statement trigger? - Mailing list pgsql-general

From Zlatko Matić
Subject Re: How to retrieve number of rows affected, in an after statement trigger?
Date
Msg-id 000e01c7c0d4$5f3ab070$e7725bd4@zlatkovyfkpgz6
Whole thread Raw
In response to Re: How to retrieve number of rows affected, in an after statement trigger?  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-general
Thank you for the answer.
At least I'm glad it is possible!
But , as I don't know Perl, could you, please, tell me how to accomplish it
in plpgsql.
Thanks,

Zlatko

----- Original Message -----
From: "Greg Sabino Mullane" <greg@turnstep.com>
To: <pgsql-general@postgresql.org>
Sent: Saturday, July 07, 2007 1:47 PM
Subject: Re: [GENERAL] How to retrieve number of rows affected, in an after
statement trigger?


>
> -----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@turnstep.com
> PGP Key: 0x14964AC8 200707070745
> http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFGj30hvJuQZxSWSsgRA9iXAJ0aiS5oVbYxcY69yY0zvig4G4eBTwCdE5ON
> EYV77TeTYNSRt46fsZDfkTI=
> =C7mD
> -----END PGP SIGNATURE-----
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


pgsql-general by date:

Previous
From: "rupesh bajaj"
Date:
Subject: Crash in PostgreSQL-8.2.4 while executing query
Next
From: "Pavel Stehule"
Date:
Subject: Re: Arrays of records?