1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

amcheck: Improve confusing message

The way it was worded, the %u placeholder could be read as the table
OID.  Rearrange slightly to avoid the possible confusion.

Reported-by: jian he <jian.universality@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxFx-25XQV%2Br23oku7ZnL958P30hyb9cFeYPv6wv7yzCCw%40mail.gmail.com
This commit is contained in:
Peter Eisentraut
2025-07-01 12:24:17 +02:00
parent 7fe2f67c7c
commit 953050236a
2 changed files with 3 additions and 3 deletions

View File

@ -1942,7 +1942,7 @@ check_tuple(HeapCheckContext *ctx, bool *xmin_commit_status_ok,
if (RelationGetDescr(ctx->rel)->natts < ctx->natts) if (RelationGetDescr(ctx->rel)->natts < ctx->natts)
{ {
report_corruption(ctx, report_corruption(ctx,
psprintf("number of attributes %u exceeds maximum expected for table %u", psprintf("number of attributes %u exceeds maximum %u expected for table",
ctx->natts, ctx->natts,
RelationGetDescr(ctx->rel)->natts)); RelationGetDescr(ctx->rel)->natts));
return; return;

View File

@ -529,7 +529,7 @@ for (my $tupidx = 0; $tupidx < $ROWCOUNT; $tupidx++)
$tup->{t_infomask2} |= HEAP_NATTS_MASK; $tup->{t_infomask2} |= HEAP_NATTS_MASK;
push @expected, push @expected,
qr/${$header}number of attributes 2047 exceeds maximum expected for table 3/; qr/${$header}number of attributes 2047 exceeds maximum 3 expected for table/;
} }
elsif ($offnum == 10) elsif ($offnum == 10)
{ {
@ -552,7 +552,7 @@ for (my $tupidx = 0; $tupidx < $ROWCOUNT; $tupidx++)
$tup->{t_hoff} = 32; $tup->{t_hoff} = 32;
push @expected, push @expected,
qr/${$header}number of attributes 67 exceeds maximum expected for table 3/; qr/${$header}number of attributes 67 exceeds maximum 3 expected for table/;
} }
elsif ($offnum == 12) elsif ($offnum == 12)
{ {