Getting current transaction id

Поиск
Список
Период
Сортировка
От Nicolai Petri
Тема Getting current transaction id
Дата
Msg-id 200607241906.24189.lists@petri.cc
обсуждение исходный текст
Ответы Re: Getting current transaction id  ("Marko Kreen" <markokr@gmail.com>)
Список pgsql-hackers
Hello all

I'm in the need for my custom written replication engine to obtain the current 
transaction id from a trigger function. As far as I'm told it's not possible 
today. Would people object much if this functionality was added for 8.2 ? 
It's the last piece of postgresql C code I have left in my application and I 
think it would be a nice information in general to have available for users. 
If not for anything else then for simple statistics.

I attached the function I use with great success today.


Best regards,
Nicolai Petri


-------------------------
PG_FUNCTION_INFO_V1(get_transaction_id);

Datum get_transaction_id(PG_FUNCTION_ARGS) {       TransactionId curxact;
       curxact=GetTopTransactionId();       return Int32GetDatum(curxact);
}
------------------------


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nicolai Petri
Дата:
Сообщение: Re: inclusion of hstore software in main tarball
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: plPHP and plRuby