pgsql: Add static assertion to track the no-padding rule of varatt_exte
pgsql: Add static assertion to track the no-padding rule of varatt_exte
От:
Michael Paquier <michael@paquier.xyz>
Дата:
Add static assertion to track the no-padding rule of varatt_external_oid varatt_external_oid (varatt_external in v19 and older branches) having no padding is a rule that has been implied for years, as pointers of this structure may be compared using memcpy(). I doubt that anybody is going to break this rule as varatt_external is old enough that it could vote in most countries, but this makes varatt.h more consistent for a follow-up change that introduces a second on-disk external TOAST pointer, and it's free to have a compile-time rule. Suggested-by: Bharath Rupireddy Discussion: https://postgr.es/m/CALj2ACVG9cjxr-0jb8PP_Vb7vJvVGBVM_fQ2srt4CpyURpfYhQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1497ea77edd2ce261670f117301dc4da33d4c894 Modified Files -------------- src/include/varatt.h | 4 ++++ 1 file changed, 4 insertions(+)