{"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","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"],"signature":"currval ( regclass ) → bigint","signature_count":1,"slug":"currval","source_rev":"b7bd9cda","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":"b7bd9cda","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":"","description_zh_html":"","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":"","description_zh_html":"","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":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-SEQUENCE-TABLE","file":"functions-sequence.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"currval","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"currval","Summary":"返回当前会话中最近一次针对该序列调用nextval所获得的值。（如果当前会话从未针对该序列调用过nextval，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过nextval，结果都是可预测的。","BodyHTML":"返回当前会话中最近一次针对该序列调用\u003ccode\u003enextval\u003c/code\u003e所获得的值。（如果当前会话从未针对该序列调用过\u003ccode\u003enextval\u003c/code\u003e，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过\u003ccode\u003enextval\u003c/code\u003e，结果都是可预测的。\u003cpre\u003ecurrval ( regclass ) → bigint\u003c/pre\u003e返回当前会话中最近一次针对该序列调用\u003ccode\u003enextval\u003c/code\u003e所获得的值。（如果当前会话从未针对该序列调用过\u003ccode\u003enextval\u003c/code\u003e，则会报错。）由于返回的是会话局部值，无论其他会话是否在当前会话调用之后执行过\u003ccode\u003enextval\u003c/code\u003e，结果都是可预测的。","SourceRevision":"ca936764","ContentHash":"52951562ff3fabba173118df0cbaca6af18aaee728cfce76e6462288a154aab2","Payload":{"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，结果都是可预测的。","signatures":[{"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，结果都是可预测的。","returns":"bigint","text":"currval ( regclass ) → bigint","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","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":"","description_zh_html":"","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":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
