Re: libpq compression (part 2) - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: libpq compression (part 2)
Date
Msg-id CAAhFRxja3=Jg6NTTbQtx-4N74FzW5TqOOFBH1LPXSVLzfgDpnw@mail.gmail.com
Whole thread Raw
In response to Re: libpq compression (part 2)  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: libpq compression (part 2)
List pgsql-hackers
On Thu, Nov 17, 2022 at 7:09 AM Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:
>
> Note that the above code was just changed in dce92e59b1.
Thanks!

> I don't know
> how that affects this patch set.
With dce92e59b1 it would be much easier to find a bug in the compression patch.

Some more notes about the patch. (sorry for posting review notes in so
many different messages)

1. zs_is_valid_impl_id(unsigned int id)
{
return id >= 0 && id < lengthof(zs_algorithms);
}

id is unsigned, no need to check it's non-negative.

2. This literal
{no_compression_name}
should be replaced by explicit form
{no_compression_name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}

3. Comments like "Return true if should, false if should not." are useless.

Thanks!

Best regards, Andrey Borodin.



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Typo in SH_LOOKUP and SH_LOOKUP_HASH comments
Next
From: Michael Paquier
Date:
Subject: Re: Getting rid of SQLValueFunction