{"Entry":{"collection":"func","key":"currval","name":"currval","aliases":[],"metadata":{"changed_in":["8.1"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.1","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"7.2"},{"descriptions_changed":true,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":["currval ( regclass ) → bigint"],"removed":["currval ( text ) → bigint"]},"status":"changed","to":"8.1"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"804690fbd58c393097c0affb04c78d94e6c6bf969aef311d1cb512d45d644c2b","derived_content_hash":"7cb4adf403c49466fbdf58de3894d07a68d39fa03603e6e030432686edc0da54","first_version":"7.2","group":"sequence","group_label":"Sequence Manipulation Functions","groups":["sequence"],"imported_at":"2026-09-27T17:57:28.840798+08:00","last_version":"20","name":"currval","name_key":"currval","position":17000,"present_in":["7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:e6ec04ba2164b52967f4a538e2ee768a35053bfa3a6270be6bd205c540ec1fa2","receipt_sha256":"560743591f543d34aecf39bafeb5869b81bbfc78f649ec643a7240be77b2ebd0","repair":"wiki-repair-20261023"},"signature":"currval ( regclass ) → bigint","signature_count":1,"slug":"currval","source_rev":"wiki-repair-20261023:5086ab8ce903f7c9683999f51b6f4b2c439ed7329bad6bd742b73a29dde826b5","summary":"Returns the value most recently obtained by nextval for this sequence in the current session.","summary_zh":""}},"Definition":{"Collection":"func","Key":"currval","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"currval","SourceRevision":"wiki-repair-20261023:5086ab8ce903f7c9683999f51b6f4b2c439ed7329bad6bd742b73a29dde826b5","Facts":{"description":"Returns the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.","description_html":"Returns the value most recently obtained by \u003ccode class=\"function\"\u003enextval\u003c/code\u003e for this sequence in the current session. (An error is reported if \u003ccode class=\"function\"\u003enextval\u003c/code\u003e has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed \u003ccode class=\"function\"\u003enextval\u003c/code\u003e since the current session did.","description_zh":"返回当前会话中最近一次针对该序列调用 nextval 所获得的值。（如果当前会话从未针对该序列调用过 nextval，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 nextval，结果都是可预测的。","description_zh_html":"返回当前会话中最近一次针对该序列调用 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e 所获得的值。（如果当前会话从未针对该序列调用过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，结果都是可预测的。","doc":{"anchor":"FUNCTIONS-SEQUENCE-TABLE","file":"functions-sequence.html","slug":"18"},"group":"sequence","group_label":"Sequence Manipulation Functions","lang":"en","layout":"table-new","pages":["functions-sequence.html"],"prose_only":false,"signatures":[{"description":"Returns the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.","description_html":"Returns the value most recently obtained by \u003ccode class=\"function\"\u003enextval\u003c/code\u003e for this sequence in the current session. (An error is reported if \u003ccode class=\"function\"\u003enextval\u003c/code\u003e has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed \u003ccode class=\"function\"\u003enextval\u003c/code\u003e since the current session did.","description_zh":"返回当前会话中最近一次针对该序列调用 nextval 所获得的值。（如果当前会话从未针对该序列调用过 nextval，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 nextval，结果都是可预测的。","description_zh_html":"返回当前会话中最近一次针对该序列调用 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e 所获得的值。（如果当前会话从未针对该序列调用过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，结果都是可预测的。","examples":[],"html":"\u003ccode class=\"function\"\u003ecurrval\u003c/code\u003e ( \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"currval ( regclass ) → bigint","zh_from":"same-version-pgdoc"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-sequence.html","sha256":"8fb4065539e7649b9d1c02d7f35333c8ae77e09b68ee1f92e78586894c7edaa6"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-SEQUENCE-TABLE","file":"functions-sequence.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"currval","SourceDatabase":"center","Version":"18","Locale":"en","Title":"currval","Summary":"Returns the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.","BodyHTML":"Returns the value most recently obtained by \u003ccode\u003enextval\u003c/code\u003e for this sequence in the current session. (An error is reported if \u003ccode\u003enextval\u003c/code\u003e has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed \u003ccode\u003enextval\u003c/code\u003e since the current session did.","SourceRevision":"wiki-repair-20261023:5086ab8ce903f7c9683999f51b6f4b2c439ed7329bad6bd742b73a29dde826b5","ContentHash":"a78ba996b45caccf5e6b08c3056e958283945016d390d9e79af4aed73db1b273","Payload":{"description":"Returns the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.","description_html":"Returns the value most recently obtained by \u003ccode class=\"function\"\u003enextval\u003c/code\u003e for this sequence in the current session. (An error is reported if \u003ccode class=\"function\"\u003enextval\u003c/code\u003e has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed \u003ccode class=\"function\"\u003enextval\u003c/code\u003e since the current session did.","signatures":[{"description":"Returns the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.","description_html":"Returns the value most recently obtained by \u003ccode class=\"function\"\u003enextval\u003c/code\u003e for this sequence in the current session. (An error is reported if \u003ccode class=\"function\"\u003enextval\u003c/code\u003e has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed \u003ccode class=\"function\"\u003enextval\u003c/code\u003e since the current session did.","description_zh":"返回当前会话中最近一次针对该序列调用 nextval 所获得的值。（如果当前会话从未针对该序列调用过 nextval，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 nextval，结果都是可预测的。","description_zh_html":"返回当前会话中最近一次针对该序列调用 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e 所获得的值。（如果当前会话从未针对该序列调用过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，结果都是可预测的。","examples":[],"html":"\u003ccode class=\"function\"\u003ecurrval\u003c/code\u003e ( \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"currval ( regclass ) → bigint","zh_from":"same-version-pgdoc"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.2","7.3","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"0eb45c090719e5df8817595209c292debe38e9b50b227e0e0e2b6dc2a42de36d","Text":"currval ( regclass ) → bigint","Returns":"bigint","Payload":{"description":"Returns the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed nextval since the current session did.","description_html":"Returns the value most recently obtained by \u003ccode class=\"function\"\u003enextval\u003c/code\u003e for this sequence in the current session. (An error is reported if \u003ccode class=\"function\"\u003enextval\u003c/code\u003e has never been called for this sequence in this session.) Because this is returning a session-local value, it gives a predictable answer whether or not other sessions have executed \u003ccode class=\"function\"\u003enextval\u003c/code\u003e since the current session did.","description_zh":"返回当前会话中最近一次针对该序列调用 nextval 所获得的值。（如果当前会话从未针对该序列调用过 nextval，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 nextval，结果都是可预测的。","description_zh_html":"返回当前会话中最近一次针对该序列调用 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e 所获得的值。（如果当前会话从未针对该序列调用过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过 \u003ccode class=\"function\"\u003enextval\u003c/code\u003e，结果都是可预测的。","examples":[],"html":"\u003ccode class=\"function\"\u003ecurrval\u003c/code\u003e ( \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"currval ( regclass ) → bigint","zh_from":"same-version-pgdoc"}}],"Spellings":null,"SQLState":null,"Evidence":null}
