Hi all, While looking at a different patch, I have noticed that the error messages produced by pg_basebackup and pg_dump are a bit inconsistent with the other others. Why not switching all of them as of the attached? This reduces the overall translation effort, using more: "this build does not support compression with %s"
Thoughts or objections? -- Michael
diff --git a/src/bin/pg_basebackup/bbstreamer_gzip.c b/src/bin/pg_basebackup/bbstreamer_gzip.c index c3455ffbdd..ad1b79e6f2 100644 --- a/src/bin/pg_basebackup/bbstreamer_gzip.c +++ b/src/bin/pg_basebackup/bbstreamer_gzip.c @@ -113,7 +113,7 @@ bbstreamer_gzip_writer_new(char *pathname, FILE *file, return &streamer->base; #else - pg_fatal("this build does not support gzip compression"); + pg_fatal("this build does not support compression with %s", "gzip"); return NULL; /* keep compiler quiet */ #endif } @@ -246,7 +246,7 @@ bbstreamer_gzip_decompressor_new(bbstreamer *next) return &streamer->base; #else - pg_fatal("this build does not support gzip compression"); + pg_fatal("this build does not support compression with %s", "gzip"); return NULL; /* keep compiler quiet */ #endif } diff --git a/src/bin/pg_basebackup/bbstreamer_lz4.c b/src/bin/pg_basebackup/bbstreamer_lz4.c index ed2aa01305..14282c4833 100644 --- a/src/bin/pg_basebackup/bbstreamer_lz4.c +++ b/src/bin/pg_basebackup/bbstreamer_lz4.c @@ -97,7 +97,7 @@ bbstreamer_lz4_compressor_new(bbstreamer *next, pg_compress_specification *compr return &streamer->base; #else - pg_fatal("this build does not support lz4 compression"); + pg_fatal("this build does not support compression with %s", "LZ4"); return NULL; /* keep compiler quiet */ #endif } @@ -295,7 +295,7 @@ bbstreamer_lz4_decompressor_new(bbstreamer *next) return &streamer->base; #else - pg_fatal("this build does not support lz4 compression"); + pg_fatal("this build does not support compression with %s", "LZ4"); return NULL; /* keep compiler quiet */ #endif } diff --git a/src/bin/pg_basebackup/bbstreamer_zstd.c b/src/bin/pg_basebackup/bbstreamer_zstd.c index 1207dd771a..72cd052c7d 100644 --- a/src/bin/pg_basebackup/bbstreamer_zstd.c +++ b/src/bin/pg_basebackup/bbstreamer_zstd.c @@ -113,7 +113,7 @@ bbstreamer_zstd_compressor_new(bbstreamer *next, pg_compress_specification *comp return &streamer->base; #else - pg_fatal("this build does not support zstd compression"); + pg_fatal("this build does not support compression with %s", "ZSTD"); return NULL; /* keep compiler quiet */ #endif } @@ -268,7 +268,7 @@ bbstreamer_zstd_decompressor_new(bbstreamer *next) return &streamer->base; #else - pg_fatal("this build does not support zstd compression"); + pg_fatal("this build does not support compression with %s", "ZSTD"); return NULL; /* keep compiler quiet */ #endif } diff --git a/src/bin/pg_dump/compress_io.c b/src/bin/pg_dump/compress_io.c index a7df600cc0..26967eb618 100644 --- a/src/bin/pg_dump/compress_io.c +++ b/src/bin/pg_dump/compress_io.c @@ -101,7 +101,7 @@ AllocateCompressor(const pg_compress_specification compression_spec, #ifndef HAVE_LIBZ if (compression_spec.algorithm == PG_COMPRESSION_GZIP) - pg_fatal("not built with zlib support"); + pg_fatal("this build does not support compression with %s", "gzip"); #endif cs = (CompressorState *) pg_malloc0(sizeof(CompressorState)); @@ -135,7 +135,7 @@ ReadDataFromArchive(ArchiveHandle *AH, #ifdef HAVE_LIBZ ReadDataFromArchiveZlib(AH, readF); #else - pg_fatal("not built with zlib support"); + pg_fatal("this build does not support compression with %s", "gzip"); #endif } } @@ -153,7 +153,7 @@ WriteDataToArchive(ArchiveHandle *AH, CompressorState *cs, #ifdef HAVE_LIBZ WriteDataToArchiveZlib(AH, cs, data, dLen); #else - pg_fatal("not built with zlib support"); + pg_fatal("this build does not support compression with %s", "gzip"); #endif break; case PG_COMPRESSION_NONE: @@ -482,7 +482,7 @@ cfopen_write(const char *path, const char *mode, fp = cfopen(fname, mode, compression_spec); free_keep_errno(fname); #else - pg_fatal("not built with zlib support"); + pg_fatal("this build does not support compression with %s", "gzip"); fp = NULL; /* keep compiler quiet */ #endif } @@ -526,7 +526,7 @@ cfopen(const char *path, const char *mode, fp = NULL; } #else - pg_fatal("not built with zlib support"); + pg_fatal("this build does not support compression with %s", "gzip"); #endif } else
signature.asc
Description: PGP signature