avoid-use-scoped-block-variable-lockfuncs.patch

application/octet-stream

Filename: avoid-use-scoped-block-variable-lockfuncs.patch
Type: application/octet-stream
Part: 0
Message: Avoid use scoped block variable

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: unified
File+
src/backend/utils/adt/lockfuncs.c 1 4
diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c
index df938812dd..4b78cc8d8d 100644
--- a/src/backend/utils/adt/lockfuncs.c
+++ b/src/backend/utils/adt/lockfuncs.c
@@ -78,11 +78,8 @@ VXIDGetDatum(ProcNumber procNumber, LocalTransactionId lxid)
 	 * decimal respectively.  Note that elog.c also knows how to format a
 	 * vxid.
 	 */
-	char		vxidstr[32];
 
-	snprintf(vxidstr, sizeof(vxidstr), "%d/%u", procNumber, lxid);
-
-	return CStringGetTextDatum(vxidstr);
+	return CStringGetTextDatum(psprintf("%d/%u", procNumber, lxid));
 }