On Wed, May 27, 2015 at 5:13 PM, Naoya Anzai <nao-an...@xc.jp.nec.com> wrote:
>> Perhaps we could make the documentation
>> clearer about those things though, changing the description of this
>> function to "get current transaction ID, and assign a new one if one
>> is not assigned yet":
>> http://www.postgresql.org/docs/devel/static/functions-info.html
> +1
>
> I think that a description of txid_current is too rough and it might
> be confused some users.
> txid_current is a different operation depending on session situations,
> I feel if detail of txid_current is documented then it will be better.
>
> For example...
> Inside of the transaction-block(begin..end), returns a transaction-id used by 
> this block.
> Outside of the transaction-block, returns a next transaction-id(but it is 
> consumed by this function).

Attached is a doc patch among those lines.
-- 
Michael
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 89a609f..6485b42 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -16233,7 +16233,7 @@ SELECT collation for ('foo' COLLATE "de_DE");
       <row>
        <entry><literal><function>txid_current()</function></literal></entry>
        <entry><type>bigint</type></entry>
-       <entry>get current transaction ID</entry>
+       <entry>get current transaction ID, assigning a new one if current transaction does not have one</entry>
       </row>
       <row>
        <entry><literal><function>txid_current_snapshot()</function></literal></entry>
-- 
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