Re: Doc: Fixed the result of the bit_count example - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Doc: Fixed the result of the bit_count example
Date
Msg-id 04205623-A800-42E9-A52C-EB0DE2F963CE@yesql.se
Whole thread Raw
In response to Doc: Fixed the result of the bit_count example  ("wangzk.fnstxz@fujitsu.com" <wangzk.fnstxz@fujitsu.com>)
Responses Re: Doc: Fixed the result of the bit_count example  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
> On 29 Jul 2021, at 11:23, wangzk.fnstxz@fujitsu.com wrote:
>
> Hello:
>
> There is a small problem with the documentation for the previously added SQL function “bit_count”.
>
> In the doc, (https://www.postgresql.org/docs/14/functions-binarystring.html)
> “bit_count('\x1234567890'::bytea)” result is "31" , but the actual result is "15".
>
> Similar problems have been fixed in test file (commit: ebedd0c78fc51c293abe56e99a18c67af14da0c9),  but the doc has
notbeen modified. 

Good catch, with the default value of standard_conforming_strings the result is
indeed 15 and should be updated to reflect that.  I'll apply this shortly
backpatched to 14 where bit_count was introduced.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: "wangzk.fnstxz@fujitsu.com"
Date:
Subject: Doc: Fixed the result of the bit_count example
Next
From: Andrew Dunstan
Date:
Subject: Re: Out-of-memory error reports in libpq