mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
toast_internals.h described the header of a compressed-in-line varlena a second time, as toast_compress_header, with its own TOAST_COMPRESS_* macros to read and write the tcinfo word. varatt.h already describes the same bytes as varattrib_4b.va_compressed and provides equivalent macros that act as setter and getter of this information, as of VARDATA_COMPRESSED_GET_EXTSIZE() and GET_COMPRESS_METHOD(). Let's remove the duplicate definition, and switch the TOAST code to use the macros from varatt.h. There should be no behavior change. Note that toast_compression.h is removed from toast_internals.h, added to the C files where its declarations are required. Author: Nikhil Kumar Veldanda <veldanda.nikhilkumar17@gmail.com> Author: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/CAFAfj_FeJQZrKyVn7ur0aJx8iz8SR14NheVJNyc8JNoqtMX+og@mail.gmail.com