*startOffset = offnum + 1;
}
else
- elog(PANIC, "failed to add item of size %u to SPGiST index page",
- (int) size);
+ elog(PANIC, "failed to add item of size %zu to SPGiST index page",
+ size);
return offnum;
}
InvalidOffsetNumber, false, false);
if (offnum == InvalidOffsetNumber && !errorOK)
- elog(ERROR, "failed to add item of size %u to SPGiST index page",
- (int) size);
+ elog(ERROR, "failed to add item of size %zu to SPGiST index page",
+ size);
return offnum;
}
{
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("could not read from log segment %s, offset %u: read %d of %zu",
+ errmsg("could not read from log segment %s, offset %u: read %d of %d",
fname, errinfo->wre_off, errinfo->wre_read,
- (Size) errinfo->wre_req)));
+ errinfo->wre_req)));
}
}
if (sizeof(char) != sizeof(xmlChar))
ereport(ERROR,
(errmsg("could not initialize XML library"),
- errdetail("libxml2 has incompatible char type: sizeof(char)=%u, sizeof(xmlChar)=%u.",
- (int) sizeof(char), (int) sizeof(xmlChar))));
+ errdetail("libxml2 has incompatible char type: sizeof(char)=%zu, sizeof(xmlChar)=%zu.",
+ sizeof(char), sizeof(xmlChar))));
#ifdef USE_LIBXMLCONTEXT
/* Set up libxml's memory allocation our way */
/* if write didn't set errno, assume problem is no disk space */
if (errno == 0)
errno = ENOSPC;
- pg_log_error(ngettext("write-ahead log file \"%s\" has %d byte, should be 0 or %d",
- "write-ahead log file \"%s\" has %d bytes, should be 0 or %d",
+ pg_log_error(ngettext("write-ahead log file \"%s\" has %zd byte, should be 0 or %d",
+ "write-ahead log file \"%s\" has %zd bytes, should be 0 or %d",
size),
- fn, (int) size, WalSegSz);
+ fn, size, WalSegSz);
pg_free(fn);
return false;
}
fatal_error("could not read file \"%s\": %m",
fname);
else
- fatal_error("could not read file \"%s\": read %d of %zu",
- fname, r, (Size) XLOG_BLCKSZ);
+ fatal_error("could not read file \"%s\": read %d of %d",
+ fname, r, XLOG_BLCKSZ);
}
close(fd);
return true;
fname, errinfo.wre_off);
}
else
- fatal_error("could not read from file %s, offset %u: read %d of %zu",
+ fatal_error("could not read from file %s, offset %u: read %d of %d",
fname, errinfo.wre_off, errinfo.wre_read,
- (Size) errinfo.wre_req);
+ errinfo.wre_req);
}
return count;