Use the proper error code for corrupt compressed array (#6943)

Currently we use elog() which has a wrong error code XX000.
This commit is contained in:
Alexander Kuzmenkov 2024-05-22 15:28:26 +02:00 committed by GitHub
parent 550977d621
commit 1d7bd07ba8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 3 additions and 4 deletions

View File

@ -368,8 +368,7 @@ tsl_array_decompression_iterator_from_datum_forward(Datum compressed_array, Oid
Assert(compressed_array_header->compression_algorithm == COMPRESSION_ALGORITHM_ARRAY);
if (element_type != compressed_array_header->element_type)
elog(ERROR, "trying to decompress the wrong type");
CheckCompressedData(element_type == compressed_array_header->element_type);
return array_decompression_iterator_alloc_forward(&si,
compressed_array_header->element_type,

View File

@ -1596,8 +1596,8 @@ group by 2, 3 order by 1 desc
count | bulk_result | rowbyrow_result
-------+-------------+-----------------
18 | true | true
14 | XX001 | XX001
7 | 08P01 | 08P01
15 | XX001 | XX001
8 | 08P01 | 08P01
2 | 3F000 | 3F000
1 | 22021 | 22021
1 | false | false