Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8acc1e0

Browse files
committed
Fix printf format to use %zd when printing sizes
Using %ld as we were doing raises compiler warnings on 32 bit platforms.Reported by Andres Freund.Discussion:https://postgr.es/m/20170407214022.fidezl2e6rk3tuiz@alap3.anarazel.de
1 parent8bf7496 commit8acc1e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/backend/statistics/dependencies.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ statext_dependencies_deserialize(bytea *data)
511511
returnNULL;
512512

513513
if (VARSIZE_ANY_EXHDR(data)<SizeOfDependencies)
514-
elog(ERROR,"invalid MVDependencies size %ld (expected at least %ld)",
514+
elog(ERROR,"invalid MVDependencies size %zd (expected at least %zd)",
515515
VARSIZE_ANY_EXHDR(data),SizeOfDependencies);
516516

517517
/* read the MVDependencies header */
@@ -547,7 +547,7 @@ statext_dependencies_deserialize(bytea *data)
547547
sizeof(AttrNumber)*2);
548548

549549
if (VARSIZE_ANY_EXHDR(data)<min_expected_size)
550-
elog(ERROR,"invalid dependencies size %ld (expected at least %ld)",
550+
elog(ERROR,"invalid dependencies size %zd (expected at least %zd)",
551551
VARSIZE_ANY_EXHDR(data),min_expected_size);
552552

553553
/* allocate space for the MCV items */

‎src/backend/statistics/mvdistinct.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ statext_ndistinct_deserialize(bytea *data)
238238

239239
/* we expect at least the basic fields of MVNDistinct struct */
240240
if (VARSIZE_ANY_EXHDR(data)<SizeOfMVNDistinct)
241-
elog(ERROR,"invalid MVNDistinct size %ld (expected at least %ld)",
241+
elog(ERROR,"invalid MVNDistinct size %zd (expected at least %zd)",
242242
VARSIZE_ANY_EXHDR(data),SizeOfMVNDistinct);
243243

244244
/* initialize pointer to the data part (skip the varlena header) */
@@ -274,7 +274,7 @@ statext_ndistinct_deserialize(bytea *data)
274274
if (VARSIZE_ANY_EXHDR(data)<minimum_size)
275275
ereport(ERROR,
276276
(errcode(ERRCODE_DATA_CORRUPTED),
277-
errmsg("invalid MVNDistinct size %ld (expected at least %ld)",
277+
errmsg("invalid MVNDistinct size %zd (expected at least %zd)",
278278
VARSIZE_ANY_EXHDR(data),minimum_size)));
279279

280280
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp