{"Entry":{"collection":"func","key":"pg-get-serial-sequence","name":"pg_get_serial_sequence","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.0"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.1","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.2"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.6","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"10"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"18","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"19"}],"content_hash":"4d408877d1c78ae1795fe48ea19537fdb16271f19e5a2c30b098a65f6010d016","derived_content_hash":"dfb6874287e4d17e709bb8ea18f1ee991ef3976fc4386b3e9423aa01e9c2951f","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:70098bb0039938e41902e12ed87b58439f2c95b0ce7667f892b738667b0f9f89","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"8.0","group":"info","group_label":"System Information Functions And Operators","groups":["info"],"imported_at":"2026-09-27T17:57:29.212206+08:00","last_version":"20","name":"pg_get_serial_sequence","name_key":"pg_get_serial_sequence","position":28071,"present_in":["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:3bc9b233f1379c454c6813765a655dc062221a48782dbb2bd2c2e188361ed65a","receipt_sha256":"39e825e9615de851a74d675ce5f679f09101a3d2d44a66f864a3c71bef4b2132","repair":"wiki-repair-20261023"},"signature":"pg_get_serial_sequence ( table text, column text ) → text","signature_count":1,"slug":"pg-get-serial-sequence","source_rev":"wiki-repair-20261023:70098bb0039938e41902e12ed87b58439f2c95b0ce7667f892b738667b0f9f89","summary":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-get-serial-sequence","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-get-serial-sequence","SourceRevision":"wiki-repair-20261023:70098bb0039938e41902e12ed87b58439f2c95b0ce7667f892b738667b0f9f89","Facts":{"description":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (serial, smallserial, bigserial), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with ALTER SEQUENCE OWNED BY. (This function probably should have been called pg_get_owned_sequence; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see Section 9.17).","description_html":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (\u003ccode class=\"type\"\u003eserial\u003c/code\u003e, \u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e. (This function probably should have been called \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see \u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. Sequence Manipulation Functions\"\u003eSection 9.17\u003c/a\u003e).","description_zh":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（serial、smallserial、bigserial）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 ALTER SEQUENCE OWNED BY 修改或删除关联。（这个函数可能应该被称为 pg_get_owned_sequence；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见第 9.17 节）。","description_zh_html":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（\u003ccode class=\"type\"\u003eserial\u003c/code\u003e、\u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e、\u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e 修改或删除关联。（这个函数可能应该被称为 \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见\u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. 序列操作函数\"\u003e第 9.17 节\u003c/a\u003e）。","doc":{"anchor":"FUNCTIONS-INFO-CATALOG-TABLE","file":"functions-info.html","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","version":"18.7"},{"file":"functions-info.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"f9684137c0b9fb17a691c4d905529d114472a507a007c15058f2703962b611d2","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"info","group_label":"系统信息函数和操作符","lang":"en","layout":"table-new","pages":["functions-info.html"],"prose_only":false,"signatures":[{"description":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (serial, smallserial, bigserial), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with ALTER SEQUENCE OWNED BY. (This function probably should have been called pg_get_owned_sequence; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see Section 9.17).","description_html":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (\u003ccode class=\"type\"\u003eserial\u003c/code\u003e, \u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e. (This function probably should have been called \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see \u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. Sequence Manipulation Functions\"\u003eSection 9.17\u003c/a\u003e).","description_zh":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（serial、smallserial、bigserial）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 ALTER SEQUENCE OWNED BY 修改或删除关联。（这个函数可能应该被称为 pg_get_owned_sequence；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见第 9.17 节）。","description_zh_html":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（\u003ccode class=\"type\"\u003eserial\u003c/code\u003e、\u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e、\u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e 修改或删除关联。（这个函数可能应该被称为 \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见\u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. 序列操作函数\"\u003e第 9.17 节\u003c/a\u003e）。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_serial_sequence\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ecolumn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_serial_sequence ( table text, column text ) → text","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-info.html","sha256":"7c33185e79430cfbda432dc4db277115c7ac846afccadfcf904ceb1bf2aa1ba5"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-INFO-CATALOG-TABLE","file":"functions-info.html","sha256":"64499116227a087138bb14f29ff6652b200a176d5df3ce2a089c3d5c226b19b3","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-get-serial-sequence","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_get_serial_sequence","Summary":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (serial, smallserial, bigserial), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with ALTER SEQUENCE OWNED BY. (This function probably should have been called pg_get_owned_sequence; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see Section 9.17).","BodyHTML":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (\u003ccode\u003eserial\u003c/code\u003e, \u003ccode\u003esmallserial\u003c/code\u003e, \u003ccode\u003ebigserial\u003c/code\u003e), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with \u003ccode\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e. (This function probably should have been called \u003ccode\u003epg_get_owned_sequence\u003c/code\u003e; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see \u003ca href=\"/docs/18/functions-sequence.html\" rel=\"nofollow\"\u003eSection 9.17\u003c/a\u003e).","SourceRevision":"wiki-repair-20261023:70098bb0039938e41902e12ed87b58439f2c95b0ce7667f892b738667b0f9f89","ContentHash":"b18e1c2554d9da6c44b330c20198693ad4d6e1a851e13910e71bc8e0c6bfc018","Payload":{"description":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (serial, smallserial, bigserial), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with ALTER SEQUENCE OWNED BY. (This function probably should have been called pg_get_owned_sequence; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see Section 9.17).","description_html":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (\u003ccode class=\"type\"\u003eserial\u003c/code\u003e, \u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e. (This function probably should have been called \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see \u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. Sequence Manipulation Functions\"\u003eSection 9.17\u003c/a\u003e).","signatures":[{"description":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (serial, smallserial, bigserial), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with ALTER SEQUENCE OWNED BY. (This function probably should have been called pg_get_owned_sequence; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see Section 9.17).","description_html":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (\u003ccode class=\"type\"\u003eserial\u003c/code\u003e, \u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e. (This function probably should have been called \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see \u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. Sequence Manipulation Functions\"\u003eSection 9.17\u003c/a\u003e).","description_zh":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（serial、smallserial、bigserial）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 ALTER SEQUENCE OWNED BY 修改或删除关联。（这个函数可能应该被称为 pg_get_owned_sequence；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见第 9.17 节）。","description_zh_html":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（\u003ccode class=\"type\"\u003eserial\u003c/code\u003e、\u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e、\u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e 修改或删除关联。（这个函数可能应该被称为 \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见\u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. 序列操作函数\"\u003e第 9.17 节\u003c/a\u003e）。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_serial_sequence\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ecolumn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_serial_sequence ( table text, column text ) → text","zh_from":"same-version-manual"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","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":"99cd22cf85a2da97670ebc1222ba44865e97ea82e673761eba7ce8e37d31d156","Text":"pg_get_serial_sequence ( table text, column text ) → text","Returns":"text","Payload":{"description":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (serial, smallserial, bigserial), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with ALTER SEQUENCE OWNED BY. (This function probably should have been called pg_get_owned_sequence; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see Section 9.17).","description_html":"Returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. If the column is an identity column, the associated sequence is the sequence internally created for that column. For columns created using one of the serial types (\u003ccode class=\"type\"\u003eserial\u003c/code\u003e, \u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e, \u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e), it is the sequence created for that serial column definition. In the latter case, the association can be modified or removed with \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e. (This function probably should have been called \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e; its current name reflects the fact that it has historically been used with serial-type columns.) The first parameter is a table name with optional schema, and the second parameter is a column name. Because the first parameter potentially contains both schema and table names, it is parsed per usual SQL rules, meaning it is lower-cased by default. The second parameter, being just a column name, is treated literally and so has its case preserved. The result is suitably formatted for passing to the sequence functions (see \u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. Sequence Manipulation Functions\"\u003eSection 9.17\u003c/a\u003e).","description_zh":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（serial、smallserial、bigserial）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 ALTER SEQUENCE OWNED BY 修改或删除关联。（这个函数可能应该被称为 pg_get_owned_sequence；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见第 9.17 节）。","description_zh_html":"返回与列相关联的序列名称，如果没有序列与该列相关联则返回 NULL。如果列是标识列，则关联序列是在内部为该列创建的序列。对于使用一种 serial 类型（\u003ccode class=\"type\"\u003eserial\u003c/code\u003e、\u003ccode class=\"type\"\u003esmallserial\u003c/code\u003e、\u003ccode class=\"type\"\u003ebigserial\u003c/code\u003e）创建的列，它是为该 serial 列定义创建的序列。在后一种情况下，可以使用 \u003ccode class=\"command\"\u003eALTER SEQUENCE OWNED BY\u003c/code\u003e 修改或删除关联。（这个函数可能应该被称为 \u003ccode class=\"function\"\u003epg_get_owned_sequence\u003c/code\u003e；它的当前名称反映了它在历史上曾与 serial 类型的列一起使用。）第一个参数是具有可选模式的表名，第二个参数是列名。由于第一个参数可能包含模式名和表名，因此按照通常的 SQL 规则解析它，这意味着默认情况下它是小写的。第二个参数只是一个列名，按照字面来处理，因此保留了它的大小写。结果经过了适当的格式化，可以传递给序列函数（参见\u003ca href=\"/docs/18/functions-sequence.html\" title=\"9.17. 序列操作函数\"\u003e第 9.17 节\u003c/a\u003e）。","examples":[],"html":"\u003ccode class=\"function\"\u003epg_get_serial_sequence\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003etable\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e, \u003cem class=\"parameter\"\u003e\u003ccode\u003ecolumn\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003etext\u003c/code\u003e","returns":"text","text":"pg_get_serial_sequence ( table text, column text ) → text","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
