Re: Unique transaction ID

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Robert Osowiecki <robson(at)cavern(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unique transaction ID
Date: 2006-01-04 15:36:19
Message-ID: c2d9e70e0601040736g19e8a51i6be9255ad6ab8edd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/4/06, Robert Osowiecki <robson(at)cavern(dot)pl> wrote:
> Apart from now() function, is there some kind of sequence that advances
> with each transaction started? If not: is it possible to implement that
> using sequences?
>
> Robson.
>
>

it exists a transaction id called XID, you can't get it via sql
though, you need to make a c function and invoke GetTopTransactionId()
(or GetCurrentTransactionId() in versions prior to 8.0)

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew - Supernews 2006-01-04 16:40:37 Re: When it is better to use "timestamp without time zone"?
Previous Message hubert depesz lubaczewski 2006-01-04 15:32:05 problem with partitioning and indexed order by