Re: [PATCH] Clarify the comments about varlena header encoding - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: [PATCH] Clarify the comments about varlena header encoding
Date
Msg-id CAJ7c6TOwfczW=xjD8_nJYqjW6bf8d3Fu_hA3UG4V2cVZQQL2YA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Clarify the comments about varlena header encoding  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: [PATCH] Clarify the comments about varlena header encoding
List pgsql-hackers
Hi John,

Many thanks for the feedback!

> Or put the now-standard 0b in front.

Good idea.

> I think the problem is ambiguity about what a "toast pointer" is. This comment:
>
> * struct varatt_external is a traditional "TOAST pointer", that is, the

Right. The comment for varatt_external says that it IS a TOAST
pointer. However the comments for varlena headers bit layout
implicitly include it into a TOAST pointer, which contradicts the
previous comments. I suggest we fix this ambiguity by explicitly
enumerating the type tag in the comments for varlena headers.

> The patch added xxx's for the type tag in a comment about
> the header. This is more misleading than what is there now.

OK, here is another attempt. Changes compared to v1:

* "xxx xxx xxx" were removed, according to the feedback
* 0b prefix was added in order to make sure the reader will not
misread this as a hex values
* The clarification about the type tag was added
* The references to "first case", "second case", etc were removed

Hopefully it's better now.

-- 
Best regards,
Aleksander Alekseev

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~
Next
From: Julien Rouhaud
Date:
Subject: Re: [PATCH] initdb: do not exit after warn_on_mount_point