v01-use-correct-variable-in-error-message-in-_allocAH-fun.patch

application/octet-stream

Filename: v01-use-correct-variable-in-error-message-in-_allocAH-fun.patch
Type: application/octet-stream
Part: 0
Message: use correct variable in error message in _allocAH function (pg_backup_archiver.c)

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v1
Subject: use correct variable in error message in _allocAH function.
File+
src/bin/pg_dump/pg_backup_archiver.c 1 1
From b9ec096c2ed98e03aa95682a6ac243c2c1fc45e4 Mon Sep 17 00:00:00 2001
From: Mahendra Singh Thalor <mahi6run@gmail.com>
Date: Tue, 15 Apr 2025 03:43:01 +0530
Subject: [PATCH] use correct variable in error message in _allocAH function.

In _allocAH function, we were using fmt variable in switch case, but
correct is AH->format.
---
 src/bin/pg_dump/pg_backup_archiver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index f961162f365..afa42337b11 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -2469,7 +2469,7 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
 			break;
 
 		default:
-			pg_fatal("unrecognized file format \"%d\"", fmt);
+			pg_fatal("unrecognized file format \"%d\"", AH->format);
 	}
 
 	return AH;
-- 
2.39.3