pgdumpx 0.2.0

Read-only, bounded inspection, extraction, and row scanning for PostgreSQL custom-format dumps
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{PgDumpError, raw_entry::checked_decompressed_count};

#[test]
fn raw_entry_decompressed_counter_overflow_is_typed() {
    let error = checked_decompressed_count(7, u64::MAX, 1).unwrap_err();
    assert!(matches!(
        error,
        PgDumpError::EntryDecompressedByteCountOverflow {
            dump_id: 7,
            consumed: u64::MAX,
            increment: 1,
        }
    ));
}