Re: Use pg_current_xact_id() instead of deprecated txid_current()

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: "Shinya Kato" <shinya11(dot)kato(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use pg_current_xact_id() instead of deprecated txid_current()
Date: 2026-02-08 10:50:24
Message-ID: 9697ad60-ec88-4446-89c1-dc02a3b8e89c@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shinya Kato 2026-02-08 12:27:10 Re: Use pg_current_xact_id() instead of deprecated txid_current()
Previous Message Amit Kapila 2026-02-08 10:20:58 Re: Skipping schema changes in publication