Note that I can't use PG_GETARG_TRANSACTIONID directly since it's a macro defined only in xid.c . It didn't seem worth extracting it and moving it to postgres.h (where the other non-ADT-specific PG_GETARG_ macros are) or its own new header just for this, so I've spelled it out each time.
I now remember that that's part of why I used bigint as an argument type. The other part is that txid_current() returns bigint and there's no cast from bigint to xid. So the tests would have to CREATE CAST or cast via 'text'. They now do the latter.
We should probably have a cast from bigint to/from xid, but the type is so little-used that it's not much fuss.