relpages_stat_update_v1.diff

application/octet-stream

Filename: relpages_stat_update_v1.diff
Type: application/octet-stream
Part: 0
Message: RE: Statistics Import and Export

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
Series: patch v1
File+
src/backend/statistics/relation_stats.c 2 2
diff --git a/src/backend/statistics/relation_stats.c b/src/backend/statistics/relation_stats.c
index ffa3d83a87..26f15061e8 100644
--- a/src/backend/statistics/relation_stats.c
+++ b/src/backend/statistics/relation_stats.c
@@ -99,11 +99,11 @@ relation_statistics_update(FunctionCallInfo fcinfo, int elevel)
 	{
 		int32		relpages = PG_GETARG_INT32(RELPAGES_ARG);
 
-		if (relpages < -1)
+		if (relpages < 0)
 		{
 			ereport(elevel,
 					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("relpages cannot be < -1")));
+					 errmsg("relpages cannot be < 0")));
 			table_close(crel, RowExclusiveLock);
 			return false;
 		}