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 E622930D1AE; Thu, 19 Jun 2003 11:41:35 +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 43501-04; Thu, 19 Jun 2003 08:41:25 -0300 (ADT) Received: from TactiCom-MA1.TactiCom.com (unknown [216.235.244.20]) by svr1.postgresql.org (Postfix) with SMTP id 273E230D183; Thu, 19 Jun 2003 08:41:25 -0300 (ADT) Received: from [203.124.133.194] by TactiCom-MA1.Nulinkinc.com (NTMail 4.30.0013/NU4135.00.d4f82e0c) with ESMTP id awufiaaa for ; Thu, 19 Jun 2003 07:41:13 -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: Thu, 19 Jun 2003 17:11:12 +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: AcM2VkBku4PB12EiQCCigMIU720MRgAADw0w From: "Anagha Joshi" To: "Bruno Wolff III" Cc: , X-Archive-Number: 200306/255 X-Sequence-Number: 9246 Consider this: Transcation begin ' ' Insert on table x ' ' Trascation end; My client C++ front end is multi-threaded. The above 'transcation' block is in thread -y . I want to know the info. abt' last row inserted into table in this transcation block. Info contains the details like time of insertion of a row and data in that row. =20 I think this sufficely explains what I want. -Anagha -----Original Message----- From: Bruno Wolff III [mailto:bruno@wolff.to]=20 Sent: Thursday, June 19, 2003 4:00 PM To: Anagha Joshi Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Latest transcation On Thu, Jun 19, 2003 at 10:46:22 +0530, Anagha Joshi wrote: > Hi All, > 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? That depends on what you really are trying to do. It sounds like using a sequnce, nextval and currval might work. That could be used to track the latest change in one session. If you try to look at the latest change to a table accross all sessions, things get a bit murky. A more precise description of what you are trying to do might result in some other suggestions.