Re: How to safely compare transaction id?

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: alphax <alphax(at)vip(dot)163(dot)com>
Cc: pg-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to safely compare transaction id?
Date: 2008-01-11 15:25:39
Message-ID: e51f66da0801110725o391bb0eh7d8c2095381493dc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/11/08, alphax <alphax(at)vip(dot)163(dot)com> wrote:
> I want to compare the record's transaction id in sql statements or
> PL/pgSQL stored procedure. Are there any system function or operator can
> safely(transaction id wraparound safed) compare the transaction id?

In 8.3 there are txid functions that export 8byte wraparound-safe
transaction id, that can be safely stored in user tables:

http://developer.postgresql.org/pgdocs/postgres/functions-info.html#FUNCTIONS-TXID-SNAPSHOT

For 8.2 and below you can get them as external module from
Skytools package: http://pgfoundry.org/projects/skytools

--
marko

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James B. Byrne 2008-01-11 16:43:54 Help with pre-loaded arbitrary key sequences
Previous Message Thomas Kellerer 2008-01-11 15:25:11 Re: alter varchar() column length?