{"Entry":{"collection":"func","key":"bit-count","name":"bit_count","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"13","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"14"}],"content_hash":"0f795c9b0e579872a9db4cb6579e915e1e1bfdc28b2af2d80e3be05e9de3834a","derived_content_hash":"3bc5eccf3e0c9036bc1b710df3b165ed70728e4e3a2ae919076bd763ed805dd2","first_version":"14","group":"binarystring","group_label":"Binary String Functions And Operators","groups":["binarystring","bitstring"],"imported_at":"2026-09-14T21:49:48.681406+08:00","last_version":"20","name":"bit_count","name_key":"bit_count","position":4000,"present_in":["14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"2026-09-14T13:14:25.684213+00:00@99e6866c","receipt_sha256":"4c0e18f4ecda8cd4f30660d5db8dd48ab5d79878c69e01810b4e94979c2a6c7c","repair":"wiki-repair-20261023"},"signature":"bit_count ( bytes bytea ) → bigint","signature_count":2,"slug":"bit-count","source_rev":"wiki-repair-20261023:310495dc3ee1465538d5156095d6e4b5282df710d9d483b78425d260fd6f69a2","summary":"Returns the number of bits set in the binary string (also known as “popcount”).","summary_zh":""}},"Definition":{"Collection":"func","Key":"bit-count","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"bit-count","SourceRevision":"wiki-repair-20261023:310495dc3ee1465538d5156095d6e4b5282df710d9d483b78425d260fd6f69a2","Facts":{"description":"Returns the number of bits set in the binary string (also known as “popcount”).","description_html":"Returns the number of bits set in the binary string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","description_zh":"返回二进制字符串中被置位的位数（也称为“popcount”）。","description_zh_html":"返回二进制字符串中被置位的位数（也称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e）。","doc":{"anchor":"FUNCTIONS-BINARYSTRING-OTHER","file":"functions-binarystring.html","slug":"18"},"group":"binarystring","group_label":"Binary String Functions And Operators","lang":"en","layout":"table-new","pages":["functions-binarystring.html","functions-bitstring.html"],"prose_only":false,"signatures":[{"description":"Returns the number of bits set in the binary string (also known as “popcount”).","description_html":"Returns the number of bits set in the binary string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","description_zh":"返回二进制字符串中被置位的位数（也称为“popcount”）。","description_zh_html":"返回二进制字符串中被置位的位数（也称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e）。","examples":[{"expr":"bit_count('\\x1234567890'::bytea)","result":"15"}],"html":"\u003ccode class=\"function\"\u003ebit_count\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"bit_count ( bytes bytea ) → bigint","zh_from":"same-version-pgdoc"},{"description":"Returns the number of bits set in the bit string (also known as “popcount”).","description_html":"Returns the number of bits set in the bit string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","description_zh":"返回位串中被置位的位数（也称为“popcount”）。","description_zh_html":"返回位串中被置位的位数（也称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e）。","examples":[{"expr":"bit_count(B'10111')","result":"4"}],"html":"\u003ccode class=\"function\"\u003ebit_count\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebit\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"bit_count ( bit ) → bigint","zh_from":"same-version-pgdoc"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-binarystring.html","sha256":"a98a1aec8735ec5efda751ce6130ddf7f9294aa38d0c0572205fff95132250b9"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-BINARYSTRING-OTHER","file":"functions-binarystring.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"bit-count","SourceDatabase":"center","Version":"18","Locale":"en","Title":"bit_count","Summary":"Returns the number of bits set in the binary string (also known as “popcount”).","BodyHTML":"Returns the number of bits set in the binary string (also known as \u003cspan\u003e“\u003cspan\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","SourceRevision":"wiki-repair-20261023:310495dc3ee1465538d5156095d6e4b5282df710d9d483b78425d260fd6f69a2","ContentHash":"5665ec33f9ab6165ef0c36554563abaaba8ce6f7a73b394cd438f41268482e49","Payload":{"description":"Returns the number of bits set in the binary string (also known as “popcount”).","description_html":"Returns the number of bits set in the binary string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","signatures":[{"description":"Returns the number of bits set in the binary string (also known as “popcount”).","description_html":"Returns the number of bits set in the binary string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","description_zh":"返回二进制字符串中被置位的位数（也称为“popcount”）。","description_zh_html":"返回二进制字符串中被置位的位数（也称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e）。","examples":[{"expr":"bit_count('\\x1234567890'::bytea)","result":"15"}],"html":"\u003ccode class=\"function\"\u003ebit_count\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"bit_count ( bytes bytea ) → bigint","zh_from":"same-version-pgdoc"},{"description":"Returns the number of bits set in the bit string (also known as “popcount”).","description_html":"Returns the number of bits set in the bit string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","description_zh":"返回位串中被置位的位数（也称为“popcount”）。","description_zh_html":"返回位串中被置位的位数（也称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e）。","examples":[{"expr":"bit_count(B'10111')","result":"4"}],"html":"\u003ccode class=\"function\"\u003ebit_count\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebit\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"bit_count ( bit ) → bigint","zh_from":"same-version-pgdoc"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"24f678da386ae02b08b14e02e8013d04a5402a5740f706d992d9732107ad1107","Text":"bit_count ( bytes bytea ) → bigint","Returns":"bigint","Payload":{"description":"Returns the number of bits set in the binary string (also known as “popcount”).","description_html":"Returns the number of bits set in the binary string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","description_zh":"返回二进制字符串中被置位的位数（也称为“popcount”）。","description_zh_html":"返回二进制字符串中被置位的位数（也称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e）。","examples":[{"expr":"bit_count('\\x1234567890'::bytea)","result":"15"}],"html":"\u003ccode class=\"function\"\u003ebit_count\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003ebytes\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003ebytea\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"bit_count ( bytes bytea ) → bigint","zh_from":"same-version-pgdoc"}},{"Version":"18","Ordinal":1,"Hash":"e9e8e030205767521dd62f23aa89add8f9b5857d8b8f7104db4c24e486ce82f0","Text":"bit_count ( bit ) → bigint","Returns":"bigint","Payload":{"description":"Returns the number of bits set in the bit string (also known as “popcount”).","description_html":"Returns the number of bits set in the bit string (also known as \u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e).","description_zh":"返回位串中被置位的位数（也称为“popcount”）。","description_zh_html":"返回位串中被置位的位数（也称为\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003epopcount\u003c/span\u003e”\u003c/span\u003e）。","examples":[{"expr":"bit_count(B'10111')","result":"4"}],"html":"\u003ccode class=\"function\"\u003ebit_count\u003c/code\u003e ( \u003ccode class=\"type\"\u003ebit\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003ebigint\u003c/code\u003e","returns":"bigint","text":"bit_count ( bit ) → bigint","zh_from":"same-version-pgdoc"}}],"Spellings":null,"SQLState":null,"Evidence":null}
