{"Entry":{"collection":"func","key":"pg-get-sequence-data","name":"pg_get_sequence_data","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"19"}],"content_hash":"01900210ec4769d5d6b38eab8491b6a492ef485c9d52094e96f9b91f4c0dceb7","first_version":"19","group":"sequence","group_label":"Sequence Manipulation Functions","groups":["sequence"],"imported_at":"2026-09-14T21:49:48.822359+08:00","last_version":"20","name":"pg_get_sequence_data","name_key":"pg_get_sequence_data","position":17003,"present_in":["19","20"],"signature":"pg_get_sequence_data ( regclass ) → record ( last_value bigint, is_called bool, page_lsn pg_lsn )","signature_count":1,"slug":"pg-get-sequence-data","source_rev":"2026-09-14T13:14:25.684213+00:00@99e6866c","summary":"Returns information about the sequence.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-get-sequence-data","SourceDatabase":"center","Version":"20","SourceTable":"func","SourceKey":"pg-get-sequence-data","SourceRevision":"2026-09-14T13:14:25.684213+00:00@99e6866c","Facts":{"description":"Returns information about the sequence. last_value is the last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. is_called indicates whether the sequence has been used. page_lsn is the LSN corresponding to the most recent WAL record that modified this sequence relation. This function returns a row of NULL values if the specified relation OID does not exist, if it is not a sequence, if the current user lacks SELECT privilege on the sequence, if the sequence is another session's temporary sequence, or if it is an unlogged sequence on a standby server.","description_html":"Returns information about the sequence. \u003ccode class=\"structfield\"\u003elast_value\u003c/code\u003e is the last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. \u003ccode class=\"structfield\"\u003eis_called\u003c/code\u003e indicates whether the sequence has been used. \u003ccode class=\"structfield\"\u003epage_lsn\u003c/code\u003e is the LSN corresponding to the most recent WAL record that modified this sequence relation. This function returns a row of NULL values if the specified relation OID does not exist, if it is not a sequence, if the current user lacks \u003ccode class=\"literal\"\u003eSELECT\u003c/code\u003e privilege on the sequence, if the sequence is another session's temporary sequence, or if it is an unlogged sequence on a standby server.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-SEQUENCE-TABLE","file":"functions-sequence.html","slug":"devel"},"group":"sequence","group_label":"Sequence Manipulation Functions","lang":"en","layout":"table-new","pages":["functions-sequence.html"],"prose_only":false,"signatures":[{"description":"Returns information about the sequence. last_value is the last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. is_called indicates whether the sequence has been used. page_lsn is the LSN corresponding to the most recent WAL record that modified this sequence relation. This function returns a row of NULL values if the specified relation OID does not exist, if it is not a sequence, if the current user lacks SELECT privilege on the sequence, if the sequence is another session's temporary sequence, or if it is an unlogged sequence on a standby server.","description_html":"Returns information about the sequence. \u003ccode class=\"structfield\"\u003elast_value\u003c/code\u003e is the last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. \u003ccode class=\"structfield\"\u003eis_called\u003c/code\u003e indicates whether the sequence has been used. \u003ccode class=\"structfield\"\u003epage_lsn\u003c/code\u003e is the LSN corresponding to the most recent WAL record that modified this sequence relation. This function returns a row of NULL values if the specified relation OID does not exist, if it is not a sequence, if the current user lacks \u003ccode class=\"literal\"\u003eSELECT\u003c/code\u003e privilege on the sequence, if the sequence is another session's temporary sequence, or if it is an unlogged sequence on a standby server.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_sequence_data\u003c/code\u003e ( \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003erecord\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003elast_value\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_called\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epage_lsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e )","returns":"record","text":"pg_get_sequence_data ( regclass ) → record ( last_value bigint, is_called bool, page_lsn pg_lsn )","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-SEQUENCE-TABLE","file":"functions-sequence.html","slug":"devel"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-get-sequence-data","SourceDatabase":"pgweb","Version":"20","Locale":"zh-Hans","Title":"pg_get_sequence_data","Summary":"返回有关序列的信息。last_value是最后一次写入磁盘的序列值。如果使用了缓存，这个值可能大于从序列中最后一次发出的值。is_called表示该序列是否已经被使用过。page_lsn是对应于最近一次修改此序列关系的 WAL 记录的 LSN。如果指定的关系 OID 不存在、该关系不是序列、当前用户没有序列上的 SELECT 权限、该序列是另一会话的临时序列，或者该序列是备库上的不记录 WAL 的序列，此函数将返回由 NULL 值组成的一行。","BodyHTML":"返回有关序列的信息。\u003ccode\u003elast_value\u003c/code\u003e是最后一次写入磁盘的序列值。如果使用了缓存，这个值可能大于从序列中最后一次发出的值。\u003ccode\u003eis_called\u003c/code\u003e表示该序列是否已经被使用过。\u003ccode\u003epage_lsn\u003c/code\u003e是对应于最近一次修改此序列关系的 WAL 记录的 LSN。如果指定的关系 OID 不存在、该关系不是序列、当前用户没有序列上的 \u003ccode\u003eSELECT\u003c/code\u003e 权限、该序列是另一会话的临时序列，或者该序列是备库上的不记录 WAL 的序列，此函数将返回由 NULL 值组成的一行。\u003cpre\u003epg_get_sequence_data ( regclass ) → record ( last_value bigint, is_called bool, page_lsn pg_lsn )\u003c/pre\u003e返回有关序列的信息。\u003ccode\u003elast_value\u003c/code\u003e是最后一次写入磁盘的序列值。如果使用了缓存，这个值可能大于从序列中最后一次发出的值。\u003ccode\u003eis_called\u003c/code\u003e表示该序列是否已经被使用过。\u003ccode\u003epage_lsn\u003c/code\u003e是对应于最近一次修改此序列关系的 WAL 记录的 LSN。如果指定的关系 OID 不存在、该关系不是序列、当前用户没有序列上的 \u003ccode\u003eSELECT\u003c/code\u003e 权限、该序列是另一会话的临时序列，或者该序列是备库上的不记录 WAL 的序列，此函数将返回由 NULL 值组成的一行。","SourceRevision":"ca936764","ContentHash":"44f9a3464b9df3fdfcf6f33789d2911105b8f1a65d4dd6eb71b2550b837519f9","Payload":{"description_zh":"返回有关序列的信息。last_value是最后一次写入磁盘的序列值。如果使用了缓存，这个值可能大于从序列中最后一次发出的值。is_called表示该序列是否已经被使用过。page_lsn是对应于最近一次修改此序列关系的 WAL 记录的 LSN。如果指定的关系 OID 不存在、该关系不是序列、当前用户没有序列上的 SELECT 权限、该序列是另一会话的临时序列，或者该序列是备库上的不记录 WAL 的序列，此函数将返回由 NULL 值组成的一行。","description_zh_html":"返回有关序列的信息。\u003ccode class=\"structfield\"\u003elast_value\u003c/code\u003e是最后一次写入磁盘的序列值。如果使用了缓存，这个值可能大于从序列中最后一次发出的值。\u003ccode class=\"structfield\"\u003eis_called\u003c/code\u003e表示该序列是否已经被使用过。\u003ccode class=\"structfield\"\u003epage_lsn\u003c/code\u003e是对应于最近一次修改此序列关系的 WAL 记录的 LSN。如果指定的关系 OID 不存在、该关系不是序列、当前用户没有序列上的 \u003ccode class=\"literal\"\u003eSELECT\u003c/code\u003e 权限、该序列是另一会话的临时序列，或者该序列是备库上的不记录 WAL 的序列，此函数将返回由 NULL 值组成的一行。","signatures":[{"description_zh":"返回有关序列的信息。last_value是最后一次写入磁盘的序列值。如果使用了缓存，这个值可能大于从序列中最后一次发出的值。is_called表示该序列是否已经被使用过。page_lsn是对应于最近一次修改此序列关系的 WAL 记录的 LSN。如果指定的关系 OID 不存在、该关系不是序列、当前用户没有序列上的 SELECT 权限、该序列是另一会话的临时序列，或者该序列是备库上的不记录 WAL 的序列，此函数将返回由 NULL 值组成的一行。","description_zh_html":"返回有关序列的信息。\u003ccode class=\"structfield\"\u003elast_value\u003c/code\u003e是最后一次写入磁盘的序列值。如果使用了缓存，这个值可能大于从序列中最后一次发出的值。\u003ccode class=\"structfield\"\u003eis_called\u003c/code\u003e表示该序列是否已经被使用过。\u003ccode class=\"structfield\"\u003epage_lsn\u003c/code\u003e是对应于最近一次修改此序列关系的 WAL 记录的 LSN。如果指定的关系 OID 不存在、该关系不是序列、当前用户没有序列上的 \u003ccode class=\"literal\"\u003eSELECT\u003c/code\u003e 权限、该序列是另一会话的临时序列，或者该序列是备库上的不记录 WAL 的序列，此函数将返回由 NULL 值组成的一行。","returns":"record","text":"pg_get_sequence_data ( regclass ) → record ( last_value bigint, is_called bool, page_lsn pg_lsn )","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"20","Ordinal":0,"Hash":"8ad47764fa66d29a0035e053943e282f90f68f438237860c71f856edc025077a","Text":"pg_get_sequence_data ( regclass ) → record ( last_value bigint, is_called bool, page_lsn pg_lsn )","Returns":"record","Payload":{"description":"Returns information about the sequence. last_value is the last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. is_called indicates whether the sequence has been used. page_lsn is the LSN corresponding to the most recent WAL record that modified this sequence relation. This function returns a row of NULL values if the specified relation OID does not exist, if it is not a sequence, if the current user lacks SELECT privilege on the sequence, if the sequence is another session's temporary sequence, or if it is an unlogged sequence on a standby server.","description_html":"Returns information about the sequence. \u003ccode class=\"structfield\"\u003elast_value\u003c/code\u003e is the last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. \u003ccode class=\"structfield\"\u003eis_called\u003c/code\u003e indicates whether the sequence has been used. \u003ccode class=\"structfield\"\u003epage_lsn\u003c/code\u003e is the LSN corresponding to the most recent WAL record that modified this sequence relation. This function returns a row of NULL values if the specified relation OID does not exist, if it is not a sequence, if the current user lacks \u003ccode class=\"literal\"\u003eSELECT\u003c/code\u003e privilege on the sequence, if the sequence is another session's temporary sequence, or if it is an unlogged sequence on a standby server.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_sequence_data\u003c/code\u003e ( \u003ccode class=\"type\"\u003eregclass\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003erecord\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003elast_value\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebigint\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003eis_called\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003epage_lsn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003epg_lsn\u003c/code\u003e )","returns":"record","text":"pg_get_sequence_data ( regclass ) → record ( last_value bigint, is_called bool, page_lsn pg_lsn )","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
