{"Entry":{"collection":"func","key":"pg-current-xact-id","name":"pg_current_xact_id","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"15","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"16"},{"descriptions_changed":true,"doc_overhaul":false,"from":"16","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"17"},{"descriptions_changed":true,"doc_overhaul":false,"from":"17","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"18"}],"content_hash":"6f423e51e0b6de4f3ff562c549f3cf018b97c18d243c984f4aa5cb0c560caa2a","derived_content_hash":"25be4f709b817ccb4d0b4ab4bc0e24f57e7cebab99b9100bfdd7fa1f241f5c7f","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:2b3b146bca6cfca318c424759d985542720144f445b59a6d6358cbbec80304ff","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"13","group":"info","group_label":"System Information Functions And Operators","groups":["info"],"imported_at":"2026-09-27T17:57:29.146977+08:00","last_version":"20","name":"pg_current_xact_id","name_key":"pg_current_xact_id","position":28047,"present_in":["13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"b7bd9cda","receipt_sha256":"4e558edbe40b184398af8abc90712b22e6a4e358733ed7a707e1e3f1546184a7","repair":"wiki-repair-20261023"},"signature":"pg_current_xact_id () → xid8","signature_count":1,"slug":"pg-current-xact-id","source_rev":"wiki-repair-20261023:2b3b146bca6cfca318c424759d985542720144f445b59a6d6358cbbec80304ff","summary":"Returns the current transaction's ID.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-current-xact-id","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-current-xact-id","SourceRevision":"wiki-repair-20261023:2b3b146bca6cfca318c424759d985542720144f445b59a6d6358cbbec80304ff","Facts":{"description":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see Section 67.1 for details. If executed in a subtransaction, this will return the top-level transaction ID; see Section 67.3 for details.","description_html":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see \u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. Transactions and Identifiers\"\u003eSection 67.1\u003c/a\u003e for details. If executed in a subtransaction, this will return the top-level transaction ID; see \u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. Subtransactions\"\u003eSection 67.3\u003c/a\u003e for details.","description_zh":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见第 67.1 节。如果在子事务中执行，它将返回顶层事务的 ID；详见第 67.3 节。","description_zh_html":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见\u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. 事务与标识符\"\u003e第 67.1 节\u003c/a\u003e。如果在子事务中执行，它将返回顶层事务的 ID；详见\u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. 子事务\"\u003e第 67.3 节\u003c/a\u003e。","doc":{"anchor":"FUNCTIONS-PG-SNAPSHOT","file":"functions-info.html","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","version":"18.7"},{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"f9684137c0b9fb17a691c4d905529d114472a507a007c15058f2703962b611d2","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"info","group_label":"系统信息函数和操作符","lang":"en","layout":"table-new","pages":["functions-info.html"],"prose_only":false,"signatures":[{"description":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see Section 67.1 for details. If executed in a subtransaction, this will return the top-level transaction ID; see Section 67.3 for details.","description_html":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see \u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. Transactions and Identifiers\"\u003eSection 67.1\u003c/a\u003e for details. If executed in a subtransaction, this will return the top-level transaction ID; see \u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. Subtransactions\"\u003eSection 67.3\u003c/a\u003e for details.","description_zh":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见第 67.1 节。如果在子事务中执行，它将返回顶层事务的 ID；详见第 67.3 节。","description_zh_html":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见\u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. 事务与标识符\"\u003e第 67.1 节\u003c/a\u003e。如果在子事务中执行，它将返回顶层事务的 ID；详见\u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. 子事务\"\u003e第 67.3 节\u003c/a\u003e。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_xact_id\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003exid8\u003c/code\u003e","returns":"xid8","text":"pg_current_xact_id () → xid8","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-info.html","sha256":"7c33185e79430cfbda432dc4db277115c7ac846afccadfcf904ceb1bf2aa1ba5"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-PG-SNAPSHOT","file":"functions-info.html","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-current-xact-id","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_current_xact_id","Summary":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see Section 67.1 for details. If executed in a subtransaction, this will return the top-level transaction ID; see Section 67.3 for details.","BodyHTML":"Returns the current transaction\u0026#39;s ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see \u003ca href=\"/docs/18/transaction-id.html\" rel=\"nofollow\"\u003eSection 67.1\u003c/a\u003e for details. If executed in a subtransaction, this will return the top-level transaction ID; see \u003ca href=\"/docs/18/subxacts.html\" rel=\"nofollow\"\u003eSection 67.3\u003c/a\u003e for details.","SourceRevision":"wiki-repair-20261023:2b3b146bca6cfca318c424759d985542720144f445b59a6d6358cbbec80304ff","ContentHash":"75a10db70b77a02a7e6fa1df5a7bbd1d83e217b3060a3c59f83fe44ede494151","Payload":{"description":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see Section 67.1 for details. If executed in a subtransaction, this will return the top-level transaction ID; see Section 67.3 for details.","description_html":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see \u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. Transactions and Identifiers\"\u003eSection 67.1\u003c/a\u003e for details. If executed in a subtransaction, this will return the top-level transaction ID; see \u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. Subtransactions\"\u003eSection 67.3\u003c/a\u003e for details.","signatures":[{"description":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see Section 67.1 for details. If executed in a subtransaction, this will return the top-level transaction ID; see Section 67.3 for details.","description_html":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see \u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. Transactions and Identifiers\"\u003eSection 67.1\u003c/a\u003e for details. If executed in a subtransaction, this will return the top-level transaction ID; see \u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. Subtransactions\"\u003eSection 67.3\u003c/a\u003e for details.","description_zh":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见第 67.1 节。如果在子事务中执行，它将返回顶层事务的 ID；详见第 67.3 节。","description_zh_html":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见\u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. 事务与标识符\"\u003e第 67.1 节\u003c/a\u003e。如果在子事务中执行，它将返回顶层事务的 ID；详见\u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. 子事务\"\u003e第 67.3 节\u003c/a\u003e。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_xact_id\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003exid8\u003c/code\u003e","returns":"xid8","text":"pg_current_xact_id () → xid8","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"ebd19fd6dbf85de7127fdba2dce70d9ae71fad9b4979e469f661dacb244b596f","Text":"pg_current_xact_id () → xid8","Returns":"xid8","Payload":{"description":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see Section 67.1 for details. If executed in a subtransaction, this will return the top-level transaction ID; see Section 67.3 for details.","description_html":"Returns the current transaction's ID. It will assign a new one if the current transaction does not have one already (because it has not performed any database updates); see \u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. Transactions and Identifiers\"\u003eSection 67.1\u003c/a\u003e for details. If executed in a subtransaction, this will return the top-level transaction ID; see \u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. Subtransactions\"\u003eSection 67.3\u003c/a\u003e for details.","description_zh":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见第 67.1 节。如果在子事务中执行，它将返回顶层事务的 ID；详见第 67.3 节。","description_zh_html":"返回当前事务的 ID。如果当前事务还没有一个 ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见\u003ca href=\"/docs/18/transaction-id.html\" title=\"67.1. 事务与标识符\"\u003e第 67.1 节\u003c/a\u003e。如果在子事务中执行，它将返回顶层事务的 ID；详见\u003ca href=\"/docs/18/subxacts.html\" title=\"67.3. 子事务\"\u003e第 67.3 节\u003c/a\u003e。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_current_xact_id\u003c/code\u003e () → \u003ccode class=\"returnvalue\"\u003exid8\u003c/code\u003e","returns":"xid8","text":"pg_current_xact_id () → xid8","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
