X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 14A1330DD44; Fri, 20 Jun 2003 08:27:31 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 89244-05; Fri, 20 Jun 2003 05:27:20 -0300 (ADT) Received: from TactiCom-MA1.TactiCom.com (unknown [216.235.244.20]) by svr1.postgresql.org (Postfix) with SMTP id EF07230DDD1; Fri, 20 Jun 2003 05:27:19 -0300 (ADT) Received: from [203.124.133.194] by TactiCom-MA1.Nulinkinc.com (NTMail 4.30.0013/NU4135.00.d4f82e0c) with ESMTP id qcdgiaaa for ; Fri, 20 Jun 2003 04:27:03 -0400 content-class: urn:content-classes:message Subject: Re: Latest transcation MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 20 Jun 2003 13:57:04 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Latest transcation Thread-Index: AcM2dXc0iF2C9K8ITUqxrDS4uKO2YwAjF/FA From: "Anagha Joshi" To: "Jonathan Gardner" Cc: , X-Archive-Number: 200306/270 X-Sequence-Number: 9261 Yes...I'm aware of that and have tried also by maintaining extra table. But how to to the following: 1. If insertion takes place, I want to return to the client the values (with field names of course) which are inserted into the tables. In each case table might be different. 2. If modification takes places, I want to know the values which are modified with field names and return them to the client. More precisely, My C++ client -- ' ' " Transcation begin insert/update query to the backend is fired. //control is tranferred to the trigger //After trigger procedure is executed, I want at this point the values inserted/modified so //as to pass them back Transcation end ' ' Pls. help Anagha -----Original Message----- From: Jonathan Gardner [mailto:jgardner@jonathangardner.net]=20 Sent: Thursday, June 19, 2003 7:26 PM To: Anagha Joshi; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Latest transcation -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 18 June 2003 22:16, Anagha Joshi wrote: > Is there any way to know programatically which is the latest=20 > insert/update occured to a particular table? What are the values which > are inserted/updated to that table? > If you want to record transaction history on a table, you'll need to use triggers and a separate table to store the history in. When the transaction=20 that modified the table commits, the modification to the history table from=20 the trigger will commit also, in the order they committed. - --=20 Jonathan Gardner (was jgardn@alumni.washington.edu) Live Free, Use Linux! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+8cD2WgwF3QvpWNwRAnoAAJ4j/gaXd2V748O2M/8pNvY9IYhGkgCeNhe2 KjXh8NwRMtMtfYFvPX69wWE=3D =3D8Aa3 -----END PGP SIGNATURE-----