src/backend/utils/adt/xid8funcs.c
Datum
pg_current_xact_id(PG_FUNCTION_ARGS)
{
	/*
	 * Must prevent during recovery because if an xid is not assigned we try
	 * to assign one, which would fail. Programs already rely on this function
	 * to always return a valid current xid, so we should not change this to
	 * return NULL or similar invalid xid.
	 */
	PreventCommandDuringRecovery("pg_current_xact_id()");

	PG_RETURN_FULLTRANSACTIONID(GetTopFullTransactionId());
}
/*
 * pg_current_xact_id() returns xid8
 *
 *	Return the current toplevel full transaction ID.
 *	If the current transaction does not have one, one is assigned.
 */
pg_current_xact_id() returns xid8
Return the current toplevel full transaction ID.
If the current transaction does not have one, one is assigned.
pg_current_xact_id () returns xid8 Return the current toplevel full transaction ID . If the current transaction does not have one one is assigned .
Datum
pg_current_xact_id(PG_FUNCTION_ARGS)
{
	PreventCommandDuringRecovery("pg_current_xact_id()");
	PG_RETURN_FULLTRANSACTIONID(GetTopFullTransactionId());
}
Datum pg_current_xact_id ( PG_FUNCTION_ARGS ) { PreventCommandDuringRecovery ( " " ) ; PG_RETURN_FULLTRANSACTIONID ( GetTopFullTransactionId ( ) ) ; }
pg_current_xact_id() returns xid8
      Return the current toplevel full transaction ID.
pg_current_xact_id () returns xid8 Return the current toplevel full transaction ID .
/*
	 * Must prevent during recovery because if an xid is not assigned we try
	 * to assign one, which would fail. Programs already rely on this function
	 * to always return a valid current xid, so we should not change this to
	 * return NULL or similar invalid xid.
	 */