{"Entry":{"collection":"func","key":"nextval","name":"nextval","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":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":["nextval ( regclass ) → bigint"],"removed":["nextval ( 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":"42c36d7494306cab045dec485e8dfaba1d78f3415df43b9713f5bdf026bfc0c7","first_version":"7.2","group":"sequence","group_label":"Sequence Manipulation Functions","groups":["sequence"],"imported_at":"2026-09-27T17:57:28.846067+08:00","last_version":"20","name":"nextval","name_key":"nextval","position":17002,"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":"nextval ( regclass ) → bigint","signature_count":1,"slug":"nextval","source_rev":"b7bd9cda","summary":"Advances the sequence object to its next value and returns that value.","summary_zh":""}},"Definition":{"Collection":"func","Key":"nextval","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"nextval","SourceRevision":"b7bd9cda","Facts":{"description":"Advances the sequence object to its next value and returns that value. This is done atomically: even if multiple sessions execute nextval concurrently, each will safely receive a distinct sequence value. If the sequence object has been created with default parameters, successive nextval calls will return successive values beginning with 1. Other behaviors can be obtained by using appropriate parameters in the CREATE SEQUENCE command.","description_html":"Advances the sequence object to its next value and returns that value. This is done atomically: even if multiple sessions execute \u003ccode class=\"function\"\u003enextval\u003c/code\u003e concurrently, each will safely receive a distinct sequence value. If the sequence object has been created with default parameters, successive \u003ccode class=\"function\"\u003enextval\u003c/code\u003e calls will return successive values beginning with 1. Other behaviors can be obtained by using appropriate parameters in the \u003ca href=\"/docs/18/sql-createsequence.html\" title=\"CREATE SEQUENCE\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE SEQUENCE\u003c/span\u003e\u003c/a\u003e command.","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":"Advances the sequence object to its next value and returns that value. This is done atomically: even if multiple sessions execute nextval concurrently, each will safely receive a distinct sequence value. If the sequence object has been created with default parameters, successive nextval calls will return successive values beginning with 1. Other behaviors can be obtained by using appropriate parameters in the CREATE SEQUENCE command.","description_html":"Advances the sequence object to its next value and returns that value. This is done atomically: even if multiple sessions execute \u003ccode class=\"function\"\u003enextval\u003c/code\u003e concurrently, each will safely receive a distinct sequence value. If the sequence object has been created with default parameters, successive \u003ccode class=\"function\"\u003enextval\u003c/code\u003e calls will return successive values beginning with 1. Other behaviors can be obtained by using appropriate parameters in the \u003ca href=\"/docs/18/sql-createsequence.html\" title=\"CREATE SEQUENCE\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE SEQUENCE\u003c/span\u003e\u003c/a\u003e command.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003enextval\u003c/code\u003e ( \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"nextval ( regclass ) → bigint","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-SEQUENCE-TABLE","file":"functions-sequence.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"nextval","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"nextval","Summary":"将序列对象推进到下一个值并返回该值。这个操作是原子的：即使多个会话并发地执行nextval，每个会话也会安全地接收到不同的序列值。如果序列对象是用默认参数创建的，则连续的nextval调用将返回以1开始的连续值。其他行为可以通过在CREATE SEQUENCE命令中使用适当的参数获得。","BodyHTML":"将序列对象推进到下一个值并返回该值。这个操作是原子的：即使多个会话并发地执行\u003ccode\u003enextval\u003c/code\u003e，每个会话也会安全地接收到不同的序列值。如果序列对象是用默认参数创建的，则连续的\u003ccode\u003enextval\u003c/code\u003e调用将返回以1开始的连续值。其他行为可以通过在\u003ca href=\"/docs/18/sql-createsequence.html\" title=\"CREATE SEQUENCE\" rel=\"nofollow\"\u003e\u003cspan\u003eCREATE SEQUENCE\u003c/span\u003e\u003c/a\u003e命令中使用适当的参数获得。\u003cpre\u003enextval ( regclass ) → bigint\u003c/pre\u003e将序列对象推进到下一个值并返回该值。这个操作是原子的：即使多个会话并发地执行\u003ccode\u003enextval\u003c/code\u003e，每个会话也会安全地接收到不同的序列值。如果序列对象是用默认参数创建的，则连续的\u003ccode\u003enextval\u003c/code\u003e调用将返回以1开始的连续值。其他行为可以通过在\u003ca href=\"/docs/18/sql-createsequence.html\" title=\"CREATE SEQUENCE\" rel=\"nofollow\"\u003e\u003cspan\u003eCREATE SEQUENCE\u003c/span\u003e\u003c/a\u003e命令中使用适当的参数获得。","SourceRevision":"ca936764","ContentHash":"e59503e983475d00bdb39d105f348bd11f11b678f72e9983ae84bfb7564faed1","Payload":{"description_zh":"将序列对象推进到下一个值并返回该值。这个操作是原子的：即使多个会话并发地执行nextval，每个会话也会安全地接收到不同的序列值。如果序列对象是用默认参数创建的，则连续的nextval调用将返回以1开始的连续值。其他行为可以通过在CREATE SEQUENCE命令中使用适当的参数获得。","description_zh_html":"将序列对象推进到下一个值并返回该值。这个操作是原子的：即使多个会话并发地执行\u003ccode class=\"function\"\u003enextval\u003c/code\u003e，每个会话也会安全地接收到不同的序列值。如果序列对象是用默认参数创建的，则连续的\u003ccode class=\"function\"\u003enextval\u003c/code\u003e调用将返回以1开始的连续值。其他行为可以通过在\u003ca href=\"/docs/18/sql-createsequence.html\" title=\"CREATE SEQUENCE\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE SEQUENCE\u003c/span\u003e\u003c/a\u003e命令中使用适当的参数获得。","signatures":[{"description_zh":"将序列对象推进到下一个值并返回该值。这个操作是原子的：即使多个会话并发地执行nextval，每个会话也会安全地接收到不同的序列值。如果序列对象是用默认参数创建的，则连续的nextval调用将返回以1开始的连续值。其他行为可以通过在CREATE SEQUENCE命令中使用适当的参数获得。","description_zh_html":"将序列对象推进到下一个值并返回该值。这个操作是原子的：即使多个会话并发地执行\u003ccode class=\"function\"\u003enextval\u003c/code\u003e，每个会话也会安全地接收到不同的序列值。如果序列对象是用默认参数创建的，则连续的\u003ccode class=\"function\"\u003enextval\u003c/code\u003e调用将返回以1开始的连续值。其他行为可以通过在\u003ca href=\"/docs/18/sql-createsequence.html\" title=\"CREATE SEQUENCE\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE SEQUENCE\u003c/span\u003e\u003c/a\u003e命令中使用适当的参数获得。","returns":"bigint","text":"nextval ( 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":"441eb0d553f8c9a371e5b64da9cdd6990b8b582e2318718019917c5be7f4899d","Text":"nextval ( regclass ) → bigint","Returns":"bigint","Payload":{"description":"Advances the sequence object to its next value and returns that value. This is done atomically: even if multiple sessions execute nextval concurrently, each will safely receive a distinct sequence value. If the sequence object has been created with default parameters, successive nextval calls will return successive values beginning with 1. Other behaviors can be obtained by using appropriate parameters in the CREATE SEQUENCE command.","description_html":"Advances the sequence object to its next value and returns that value. This is done atomically: even if multiple sessions execute \u003ccode class=\"function\"\u003enextval\u003c/code\u003e concurrently, each will safely receive a distinct sequence value. If the sequence object has been created with default parameters, successive \u003ccode class=\"function\"\u003enextval\u003c/code\u003e calls will return successive values beginning with 1. Other behaviors can be obtained by using appropriate parameters in the \u003ca href=\"/docs/18/sql-createsequence.html\" title=\"CREATE SEQUENCE\"\u003e\u003cspan class=\"refentrytitle\"\u003eCREATE SEQUENCE\u003c/span\u003e\u003c/a\u003e command.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003enextval\u003c/code\u003e ( \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"nextval ( regclass ) → bigint","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
