Naoya Anzai <nao-anzai(at)xc(dot)jp(dot)nec(dot)com> writes:
> I have a question about txid_current().
> it is "Why does txid_current() assign new transaction-id?".
Consider
begin;
select txid_current();
insert into my_table ...;
commit;
If we changed the code as you propose, the result of the SELECT would
no longer have anything to do with the XID used for the insertion.
regards, tom lane