Re: Patch to document base64 encoding - Mailing list pgsql-hackers

From Karl O. Pinc
Subject Re: Patch to document base64 encoding
Date
Msg-id 20200117122219.120382c0@slate.karlpinc.com
Whole thread Raw
In response to Re: Patch to document base64 encoding  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: Patch to document base64 encoding  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: "Karl O. Pinc"
Date:
Subject: Re: Patch to document base64 encoding
Next
From: Tom Lane
Date:
Subject: Re: BUG #16213: segfault when running a query