Re: Use pg_current_xact_id() instead of deprecated txid_current() - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Use pg_current_xact_id() instead of deprecated txid_current()
Date
Msg-id 9697ad60-ec88-4446-89c1-dc02a3b8e89c@app.fastmail.com
Whole thread Raw
In response to Use pg_current_xact_id() instead of deprecated txid_current()  (Shinya Kato <shinya11.kato@gmail.com>)
Responses Re: Use pg_current_xact_id() instead of deprecated txid_current()
Re: Use pg_current_xact_id() instead of deprecated txid_current()
List pgsql-hackers
On 2026-02-08, Shinya Kato wrote:

> Since pg_current_xact_id() returns xid8 which does not support
> arithmetic operators, places that need "xid + 1" cast the result via
> ::text::bigint first.

I think it may be better to add some operators, or was there a rationale for these not being there?

--
Álvaro Herrera



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Skipping schema changes in publication
Next
From: Shinya Kato
Date:
Subject: Re: Use pg_current_xact_id() instead of deprecated txid_current()