Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9C65D476214; Mon, 23 Sep 2002 11:39:34 -0400 (EDT) Received: from beamish.nsd.ca (unknown [205.150.156.194]) by postgresql.org (Postfix) with ESMTP id 6EBF347619B; Mon, 23 Sep 2002 11:39:33 -0400 (EDT) Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id LAA09365; Mon, 23 Sep 2002 11:39:36 -0400 X-Authentication-Warning: beamish.nsd.ca: smap set sender to using -f Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap (V2.1/2.1+anti-relay+anti-spam) id xma009363; Mon, 23 Sep 02 11:39:11 -0400 Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148]) by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id LAA02260; Mon, 23 Sep 2002 11:39:00 -0400 Message-ID: <3D8F3775.B5DD079@nsd.ca> Date: Mon, 23 Sep 2002 11:47:01 -0400 From: Jean-Luc Lachance X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-31 i686) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane Cc: pgsql-sql@postgresql.org, pgsql-general@postgresql.org Subject: Re: Getting acces to MVCC version number References: <200209201619.g8KGJ4J00624@candle.pha.pa.us> <3D8B676D.3109ACFA@nsd.ca> <2566.1032557012@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/1003 X-Sequence-Number: 30584 That is great! Thanks for the info. Tom Lane wrote: > > Jean-Luc Lachance writes: > > How about making available the MVCC last version number just like oid is > > available. This would simplify a lot of table design. You know, having > > to add a field "updated::timestamp" to detect when a record was updated > > while viewing it (a la pgaccess). > > That way, if the version number do not match, one would know that the > > reccord was updated since last retrieved. > > > What do think? > > I think it's already there: see xmin and cmin. Depending on your needs, > testing xmin might be enough (you'd only need to pay attention to cmin > if you wanted to notice changes within your own transaction). > > regards, tom lane