Naoya Anzai <nao-an...@xc.jp.nec.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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to