pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anagha Joshi <ajoshi@nulinkinc.com>
To: Bruno Wolff III <bruno@wolff.to>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Latest transcation
Date: Thu, 19 Jun 2003 17:11:12 +0530
Message-ID: <FF851C7EEB75954F9BCFB5CA117AB1EC092831@delta.nulinkinc.com> (raw)


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@wolff.to] 
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 <ajoshi@nulinkinc.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.



view thread (4+ messages)  latest in thread

Message-ID: <FF851C7EEB75954F9BCFB5CA117AB1EC092831@delta.nulinkinc.com>
Permalink:  ../FF851C7EEB75954F9BCFB5CA117AB1EC092831@delta.nulinkinc.com/
Also on:    postgresql.org/message-id/FF851C7EEB75954F9BCFB5CA117AB1EC092831@delta.nulinkinc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ajoshi@nulinkinc.com, bruno@wolff.to, pgsql-admin@postgresql.org
  Subject: Re: Latest transcation
  In-Reply-To: <FF851C7EEB75954F9BCFB5CA117AB1EC092831@delta.nulinkinc.com>
  References: <FF851C7EEB75954F9BCFB5CA117AB1EC092831@delta.nulinkinc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox