Re: Latest transcation

From: "Anagha Joshi" <ajoshi(at)nulinkinc(dot)com>
To: "Bruno Wolff III" <bruno(at)wolff(dot)to>
Cc: <pgsql-admin(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Latest transcation
Date: 2003-06-19 11:41:12
Message-ID: FF851C7EEB75954F9BCFB5CA117AB1EC092831@delta.nulinkinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql


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.

I think this sufficely explains what I want.

-Anagha
-----Original Message-----
From: Bruno Wolff III [mailto:bruno(at)wolff(dot)to]
Sent: Thursday, June 19, 2003 4:00 PM
To: Anagha Joshi
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Latest transcation

On Thu, Jun 19, 2003 at 10:46:22 +0530,
Anagha Joshi <ajoshi(at)nulinkinc(dot)com> wrote:
> Hi All,
> Is there any way to know programatically which is the latest
> 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.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jonathan Gardner 2003-06-19 13:56:06 Re: Latest transcation
Previous Message Bruno Wolff III 2003-06-19 10:30:29 Re: Latest transcation

Browse pgsql-sql by date

  From Date Subject
Next Message Jonathan Gardner 2003-06-19 14:07:36 Re: Latest transcation
Previous Message Marcin Winkler 2003-06-19 00:38:32 is this possible in plpgsql ?