Renamed decompressed_size into compressed_size according to actual meaning.
authorSvetlana Derevyanko <[email protected]>
Mon, 23 Aug 2021 08:11:37 +0000 (11:11 +0300)
committerChristoph Berg <[email protected]>
Wed, 29 Sep 2021 15:58:59 +0000 (17:58 +0200)
decode.c

index ba6e1dfe49da9359e91b24db0591a0c02a345918..027459e909c2518d01a5333711077e2e4b1c0b10 100644 (file)
--- a/decode.c
+++ b/decode.c
@@ -1033,7 +1033,7 @@ FormatDecode(const char *tupleData, unsigned int tupleSize)
        CopyFlush();
 }
 
-static int DumpCompressedString(const char *data, int32 decompressed_size)
+static int DumpCompressedString(const char *data, int32 compressed_size)
 {
        int                                             decompress_ret;
        char                               *decompress_tmp_buff = malloc(TOAST_COMPRESS_RAWSIZE(data));
@@ -1044,7 +1044,7 @@ static int DumpCompressedString(const char *data, int32 decompressed_size)
        {
                case TOAST_PGLZ_COMPRESSION_ID:
                        decompress_ret = pglz_decompress(TOAST_COMPRESS_RAWDATA(data),
-                                                                                        decompressed_size - TOAST_COMPRESS_HEADER_SIZE,
+                                                                                        compressed_size - TOAST_COMPRESS_HEADER_SIZE,
                                                                                         decompress_tmp_buff, TOAST_COMPRESS_RAWSIZE(data)
 #if PG_VERSION_NUM >= 120000
                                                                                         , true
@@ -1054,7 +1054,7 @@ static int DumpCompressedString(const char *data, int32 decompressed_size)
                case TOAST_LZ4_COMPRESSION_ID:
 #ifdef USE_LZ4
                        decompress_ret = LZ4_decompress_safe(TOAST_COMPRESS_RAWDATA(data),
-                                                                                                decompress_tmp_buff, decompressed_size - TOAST_COMPRESS_HEADER_SIZE,
+                                                                                                decompress_tmp_buff, compressed_size - TOAST_COMPRESS_HEADER_SIZE,
                                                                                                 TOAST_COMPRESS_RAWSIZE(data));
                        break;
 #else