On 2012-12-06 13:59:32 -0500, Tom Lane wrote: > Andres Freund <and...@2ndquadrant.com> writes: > > On 2012-12-06 15:08:51 -0300, Alvaro Herrera wrote: > >> Vlad Arkhipov <arhi...@dc.baikal.ru> writes: > >>> In a BEFORE UPDATE trigger I need to know whether the row was previously > >>> modified by this transaction. Is it safe to use xmin and txid_current() > >>> for this purpose (xmin is 32-bit txid type but txid_current() returns > >>> 64-bit bigint). > > > I wonder if we shouldn't have a function txid_is_current(xid); > > Yeah, I was wondering that too, and wanted to know if the OP had a > use-case that was mainstream enough to justify adding such a function.
I think architectures with an invalidation-queue to external caches (be it web-proxies or something lower-level) are quite popular. And with the new NOTIFY or pgq relatively simple. Ad to those its sensible not to post a single primary key more than once. Magnus had talks about specifically that on various conferences if that counts as anything ;) Mainstreamy enough? Andres -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers