{"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","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"],"signature":"pg_current_xact_id () → xid8","signature_count":1,"slug":"pg-current-xact-id","source_rev":"b7bd9cda","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":"b7bd9cda","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":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-PG-SNAPSHOT","file":"functions-info.html","slug":"18"},"group":"info","group_label":"System Information Functions And Operators","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":"","description_zh_html":"","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":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-PG-SNAPSHOT","file":"functions-info.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-current-xact-id","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_current_xact_id","Summary":"返回当前事务的ID。如果当前事务还没有一个ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见第 67.1 节。如果在子事务中执行，它将返回顶层事务的ID；详见第 67.3 节。","BodyHTML":"返回当前事务的ID。如果当前事务还没有一个ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见\u003ca href=\"/docs/18/transaction-id.html\" rel=\"nofollow\"\u003e第 67.1 节\u003c/a\u003e。如果在子事务中执行，它将返回顶层事务的ID；详见\u003ca href=\"/docs/18/subxacts.html\" rel=\"nofollow\"\u003e第 67.3 节\u003c/a\u003e。\u003cpre\u003epg_current_xact_id () → xid8\u003c/pre\u003e返回当前事务的ID。如果当前事务还没有一个ID（因为它还没有执行任何数据库更新），它将分配一个新的事务 ID；详见\u003ca href=\"/docs/18/transaction-id.html\" rel=\"nofollow\"\u003e第 67.1 节\u003c/a\u003e。如果在子事务中执行，它将返回顶层事务的ID；详见\u003ca href=\"/docs/18/subxacts.html\" rel=\"nofollow\"\u003e第 67.3 节\u003c/a\u003e。","SourceRevision":"ca936764","ContentHash":"313940196600c888306b5ec4e0e81f9ec28dd321242c6ff2186541790b088197","Payload":{"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。","signatures":[{"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。","returns":"xid8","text":"pg_current_xact_id () → xid8","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","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":"","description_zh_html":"","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":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
