Re: Should we add xid_current() or a int8->xid cast? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Should we add xid_current() or a int8->xid cast?
Date
Msg-id 9204.1564014879@sss.pgh.pa.us
Whole thread Raw
In response to Re: Should we add xid_current() or a int8->xid cast?  (Andres Freund <andres@anarazel.de>)
Responses Re: Should we add xid_current() or a int8->xid cast?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-07-25 12:20:58 +1200, Thomas Munro wrote:
>> On Thu, Jul 25, 2019 at 12:06 PM Andres Freund <andres@anarazel.de> wrote:
>>> Seems easiest to just add xid_current(), or add a cast from int8 to xid
>>> (probably explicit?) that handles the wraparound logic correctly?

>> Yeah, I was wondering about that.  int8 isn't really the right type,
>> since FullTransactionId is unsigned.

> For now that doesn't seem that big an impediment...

Yeah, I would absolutely NOT recommend that you open that can of worms
right now.  We have looked at adding unsigned integer types in the past
and it looked like a mess.

I think an explicit cast is a reasonable thing to add, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Should we add xid_current() or a int8->xid cast?
Next
From: Andres Freund
Date:
Subject: Re: Should we add xid_current() or a int8->xid cast?