{"Entry":{"collection":"func","key":"bit-length","name":"bit_length","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":"7.2","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"7.3"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":["bit_length ( string ) → int"],"removed":["bit_length ( string ) → integer"]},"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":"7dae20988e97cdcc75cd761e931c25581525794b12cc6f5c14a5c550a0445514","derived_content_hash":"175ee01f5910986bc81c6c51af3065cfa9fe067c395ee1f55c22fc0409baaee2","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:92150a609df3c0103d86110df8f859e29ec6bbff02db907d57110c18e5525a2f","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.2","group":"string","group_label":"String Functions And Operators","groups":["string","binarystring","bitstring"],"imported_at":"2026-09-27T17:57:28.309623+08:00","last_version":"20","name":"bit_length","name_key":"bit_length","position":3001,"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:d45d3bb33858b79cc1b6e0977e137a3902e6c9d7b3bce7d633b478e973769e2f","receipt_sha256":"93c5f851fac38799a2e161085c2a99979112c639dfd23be5015d2f8b04c5a0b3","repair":"wiki-repair-20261023"},"signature":"bit_length ( text ) → integer","signature_count":3,"slug":"bit-length","source_rev":"wiki-repair-20261023:92150a609df3c0103d86110df8f859e29ec6bbff02db907d57110c18e5525a2f","summary":"Returns number of bits in the string (8 times the octet_length).","summary_zh":""}},"Definition":{"Collection":"func","Key":"bit-length","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"bit-length","SourceRevision":"wiki-repair-20261023:92150a609df3c0103d86110df8f859e29ec6bbff02db907d57110c18e5525a2f","Facts":{"description":"Returns number of bits in the string (8 times the octet_length).","description_html":"Returns number of bits in the string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","description_zh":"返回字符串中的位数（8 倍于 octet_length）。","description_zh_html":"返回字符串中的位数（8 倍于 \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e）。","doc":{"anchor":"FUNCTIONS-STRING-SQL","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-binarystring.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"cd434063935e362cbb3621171770936b04bafcd58673d71a20cd6992580b2d84","version":"18.7"},{"file":"functions-bitstring.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"270c5c14b6fe519e8d8cc3f7514e0202aa8d534d1e9c8f62ab1ad6802faaa531","version":"18.7"},{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","version":"18.7"},{"file":"functions-binarystring.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"a5ee5be3c79e45371853d5c6dd8b1b3f52734bbc17726dbe626837179a1da1e0","version":"18.7"},{"file":"functions-bitstring.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"6b6423f8b2751016eae606a5cdcf7062bd62f230a0ef96b83e357418208bc67e","version":"18.7"},{"file":"functions-string.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"7eecd3bb343149124be0476a539f3c682476eab2a15489a0e0ad06fbb769ea9e","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"string","group_label":"字符串函数和操作符","lang":"en","layout":"table-new","pages":["functions-string.html","functions-binarystring.html","functions-bitstring.html"],"prose_only":false,"signatures":[{"description":"Returns number of bits in the string (8 times the octet_length).","description_html":"Returns number of bits in the string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","description_zh":"返回字符串中的位数（8 倍于 octet_length）。","description_zh_html":"返回字符串中的位数（8 倍于 \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e）。","examples":[{"expr":"bit_length('jose')","result":"32"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( text ) → integer","zh_from":"same-version-manual"},{"description":"Returns number of bits in the binary string (8 times the octet_length).","description_html":"Returns number of bits in the binary string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","description_zh":"返回二进制字符串中的位数（8 倍于 octet_length）。","description_zh_html":"返回二进制字符串中的位数（8 倍于 \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e）。","examples":[{"expr":"bit_length('\\x123456'::bytea)","result":"24"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( bytea ) → integer","zh_from":"same-version-manual"},{"description":"Returns number of bits in the bit string.","description_html":"Returns number of bits in the bit string.","description_zh":"返回位串中的位数。","description_zh_html":"返回位串中的位数。","examples":[{"expr":"bit_length(B'10111')","result":"5"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebit\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( bit ) → integer","zh_from":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-string.html","sha256":"0446377e0eccc9299099dc4b4b293204c337e3abefcdc396e9698bc54dd1080b"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-STRING-SQL","file":"functions-string.html","sha256":"dbe9f91e55c35969d99a8d2697b6f7bd5388a24ccc2b89706a666f176025f1e2","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"bit-length","SourceDatabase":"center","Version":"18","Locale":"en","Title":"bit_length","Summary":"Returns number of bits in the string (8 times the octet_length).","BodyHTML":"Returns number of bits in the string (8 times the \u003ccode\u003eoctet_length\u003c/code\u003e).","SourceRevision":"wiki-repair-20261023:92150a609df3c0103d86110df8f859e29ec6bbff02db907d57110c18e5525a2f","ContentHash":"4716532a18d9d762dc6677b081c7f77ed6ff64009565d7f90a6fc78d931786c8","Payload":{"description":"Returns number of bits in the string (8 times the octet_length).","description_html":"Returns number of bits in the string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","signatures":[{"description":"Returns number of bits in the string (8 times the octet_length).","description_html":"Returns number of bits in the string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","description_zh":"返回字符串中的位数（8 倍于 octet_length）。","description_zh_html":"返回字符串中的位数（8 倍于 \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e）。","examples":[{"expr":"bit_length('jose')","result":"32"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( text ) → integer","zh_from":"same-version-manual"},{"description":"Returns number of bits in the binary string (8 times the octet_length).","description_html":"Returns number of bits in the binary string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","description_zh":"返回二进制字符串中的位数（8 倍于 octet_length）。","description_zh_html":"返回二进制字符串中的位数（8 倍于 \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e）。","examples":[{"expr":"bit_length('\\x123456'::bytea)","result":"24"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( bytea ) → integer","zh_from":"same-version-manual"},{"description":"Returns number of bits in the bit string.","description_html":"Returns number of bits in the bit string.","description_zh":"返回位串中的位数。","description_zh_html":"返回位串中的位数。","examples":[{"expr":"bit_length(B'10111')","result":"5"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebit\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( bit ) → integer","zh_from":"same-version-manual"}]}},"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":"43d1d10b22f57614a9509d893ac9b746f3c3693026408fe02a035e6eb1f7bf7c","Text":"bit_length ( text ) → integer","Returns":"integer","Payload":{"description":"Returns number of bits in the string (8 times the octet_length).","description_html":"Returns number of bits in the string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","description_zh":"返回字符串中的位数（8 倍于 octet_length）。","description_zh_html":"返回字符串中的位数（8 倍于 \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e）。","examples":[{"expr":"bit_length('jose')","result":"32"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( text ) → integer","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":1,"Hash":"9612041fdcf7330f475b9a7acf42581151b13bae4782b805edf733ec0889ce62","Text":"bit_length ( bytea ) → integer","Returns":"integer","Payload":{"description":"Returns number of bits in the binary string (8 times the octet_length).","description_html":"Returns number of bits in the binary string (8 times the \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e).","description_zh":"返回二进制字符串中的位数（8 倍于 octet_length）。","description_zh_html":"返回二进制字符串中的位数（8 倍于 \u003ccode class=\"function\"\u003eoctet_length\u003c/code\u003e）。","examples":[{"expr":"bit_length('\\x123456'::bytea)","result":"24"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( bytea ) → integer","zh_from":"same-version-manual"}},{"Version":"18","Ordinal":2,"Hash":"fe6f5d903356f69f38dda9bf76002756bd5d8d1d9019a048d5886ae656357ef0","Text":"bit_length ( bit ) → integer","Returns":"integer","Payload":{"description":"Returns number of bits in the bit string.","description_html":"Returns number of bits in the bit string.","description_zh":"返回位串中的位数。","description_zh_html":"返回位串中的位数。","examples":[{"expr":"bit_length(B'10111')","result":"5"}],"html":"\u003ccode class=\"function\"\u003ebit_length\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebit\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003einteger\u003c/code\u003e","returns":"integer","text":"bit_length ( bit ) → integer","zh_from":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
