Re: Patch to document base64 encoding
Karl O. Pinc <kop@karlpinc.com>
From: "Karl O. Pinc" <kop@karlpinc.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Michael Paquier
<michael@paquier.xyz>
Date: 2020-01-17T18:22:19Z
Lists: pgsql-hackers
Attachments
- doc_base64_v14.patch (text/x-patch) patch v14
On Thu, 16 Jan 2020 14:41:33 +0100 (CET)
Fabien COELHO <coelho@cri.ensmp.fr> wrote:
> Some comments about v13:
>
> The note about get_byte reads:
>
> get_byte and set_byte number the first byte of a binary string as
> byte 0. get_bit and set_bit number bits from the right within each
> byte; for example bit 0 is the least significant bit of the first
> byte, and bit 15 is the most significant bit of the second byte.
>
> The two sentences starts with a lower case letter, which looks
> strange to me. I'd suggest to put "Functions" at the beginning of the
> sentences:
>
> Functions get_byte and set_byte number the first byte of a binary
> string as byte 0. Functions get_bit and set_bit number bits from the
> right within each byte; for example bit 0 is the least significant
> bit of the first byte, and bit 15 is the most significant bit of the
> second byte.
Excellent suggestion, done.
> The note about hash provides an example for getting the hex
> representation out of sha*. I'd add an exemple to get the bytea
> representation from md5, eg "DECODE(MD5('hello world'), 'hex')"…
Ok. Done.
> Maybe the encode/decode in the note could be linked to the function
> description? Well, they are just after, maybe it is not very useful.
Can't hurt? Done.
Patch attached: doc_base64_v14.patch
Regards,
Karl <kop@karlpinc.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Commits
-
Doc: rearrange the documentation of binary-string functions.
- 34a0a81bfb38 13.0 landed