* fail.
*/
elog(WARNING,
- "Adding attribute code %i with length %i to radius packet would create oversize packet, ignoring",
+ "Adding attribute code %d with length %d to radius packet would create oversize packet, ignoring",
type, len);
return;
{
#ifdef HAVE_IPV6
ereport(LOG,
- (errmsg("RADIUS response was sent from incorrect port: %i",
+ (errmsg("RADIUS response was sent from incorrect port: %d",
ntohs(remoteaddr.sin6_port))));
#else
ereport(LOG,
- (errmsg("RADIUS response was sent from incorrect port: %i",
+ (errmsg("RADIUS response was sent from incorrect port: %d",
ntohs(remoteaddr.sin_port))));
#endif
continue;
if (packetlength < RADIUS_HEADER_LENGTH)
{
ereport(LOG,
- (errmsg("RADIUS response too short: %i", packetlength)));
+ (errmsg("RADIUS response too short: %d", packetlength)));
continue;
}
if (packetlength != ntohs(receivepacket->length))
{
ereport(LOG,
- (errmsg("RADIUS response has corrupt length: %i (actual length %i)",
+ (errmsg("RADIUS response has corrupt length: %d (actual length %d)",
ntohs(receivepacket->length), packetlength)));
continue;
}
if (packet->id != receivepacket->id)
{
ereport(LOG,
- (errmsg("RADIUS response is to a different request: %i (should be %i)",
+ (errmsg("RADIUS response is to a different request: %d (should be %d)",
receivepacket->id, packet->id)));
continue;
}
else
{
ereport(LOG,
- (errmsg("RADIUS response has invalid code (%i) for user \"%s\"",
+ (errmsg("RADIUS response has invalid code (%d) for user \"%s\"",
receivepacket->code, port->user_name)));
continue;
}
break;
default:
ereport(NOTICE,
- (errmsg_internal("unrecognized win32 socket error code: %i", WSAGetLastError())));
+ (errmsg_internal("unrecognized win32 socket error code: %d", WSAGetLastError())));
errno = EINVAL;
}
}
if (waitevent == INVALID_HANDLE_VALUE)
ereport(ERROR,
- (errmsg_internal("could not create socket waiting event: %i", (int) GetLastError())));
+ (errmsg_internal("could not create socket waiting event: %d", (int) GetLastError())));
}
else if (!ResetEvent(waitevent))
ereport(ERROR,
- (errmsg_internal("could not reset socket waiting event: %i", (int) GetLastError())));
+ (errmsg_internal("could not reset socket waiting event: %d", (int) GetLastError())));
/*
* make sure we don't multiplex this kernel event object with a different
if (r == WAIT_TIMEOUT)
return 0;
ereport(ERROR,
- (errmsg_internal("unrecognized return value from WaitForMultipleObjects: %i (%i)", r, (int) GetLastError())));
+ (errmsg_internal("unrecognized return value from WaitForMultipleObjects: %d (%d)", r, (int) GetLastError())));
return 0;
}
ZeroMemory(&resEvents, sizeof(resEvents));
if (WSAEnumNetworkEvents(sockets[i], events[i], &resEvents) == SOCKET_ERROR)
ereport(FATAL,
- (errmsg_internal("failed to enumerate network events: %i", (int) GetLastError())));
+ (errmsg_internal("failed to enumerate network events: %d", (int) GetLastError())));
/* Read activity? */
if (readfds && FD_ISSET(sockets[i], readfds))
{
handleDLL = LoadLibraryEx("netmsg.dll", NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_AS_DATAFILE);
if (handleDLL == NULL)
ereport(FATAL,
- (errmsg_internal("could not load netmsg.dll: %i", (int) GetLastError())));
+ (errmsg_internal("could not load netmsg.dll: %d", (int) GetLastError())));
}
ZeroMemory(&wserrbuf, sizeof(wserrbuf));
NULL) == 0)
{
/* Failed to get id */
- sprintf(wserrbuf, "unrecognized winsock error %i", err);
+ sprintf(wserrbuf, "unrecognized winsock error %d", err);
}
return wserrbuf;
}
ZeroMemory(&resEvents, sizeof(resEvents));
if (WSAEnumNetworkEvents(sock, sockevent, &resEvents) == SOCKET_ERROR)
ereport(FATAL,
- (errmsg_internal("failed to enumerate network events: %i", (int) GetLastError())));
+ (errmsg_internal("failed to enumerate network events: %d", (int) GetLastError())));
if ((wakeEvents & WL_SOCKET_READABLE) &&
(resEvents.lNetworkEvents & FD_READ))
* call)
*/
fprintf(stderr,
- INT64_FORMAT "/" INT64_FORMAT " kB (100%%) %i/%i tablespaces %35s\r",
+ INT64_FORMAT "/" INT64_FORMAT " kB (100%%) %d/%d tablespaces %35s\r",
totaldone / 1024, totalsize,
tablespacenum, tablespacecount, "");
else
fprintf(stderr,
- INT64_FORMAT "/" INT64_FORMAT " kB (%i%%) %i/%i tablespaces (%-30.30s)\r",
+ INT64_FORMAT "/" INT64_FORMAT " kB (%d%%) %d/%d tablespaces (%-30.30s)\r",
totaldone / 1024, totalsize,
percent,
tablespacenum, tablespacecount, fn);
}
else
- fprintf(stderr, INT64_FORMAT "/" INT64_FORMAT " kB (%i%%) %i/%i tablespaces\r",
+ fprintf(stderr, INT64_FORMAT "/" INT64_FORMAT " kB (%d%%) %d/%d tablespaces\r",
totaldone / 1024, totalsize,
percent,
tablespacenum, tablespacecount);
ztarfile = gzdopen(dup(fileno(stdout)), "wb");
if (gzsetparams(ztarfile, compresslevel, Z_DEFAULT_STRATEGY) != Z_OK)
{
- fprintf(stderr, _("%s: could not set compression level %i: %s\n"),
+ fprintf(stderr, _("%s: could not set compression level %d: %s\n"),
progname, compresslevel, get_gz_error(ztarfile));
disconnect_and_exit(1);
}
ztarfile = gzopen(fn, "wb");
if (gzsetparams(ztarfile, compresslevel, Z_DEFAULT_STRATEGY) != Z_OK)
{
- fprintf(stderr, _("%s: could not set compression level %i: %s\n"),
+ fprintf(stderr, _("%s: could not set compression level %d: %s\n"),
progname, compresslevel, get_gz_error(ztarfile));
disconnect_and_exit(1);
}
ztarfile = gzopen(fn, "wb");
if (gzsetparams(ztarfile, compresslevel, Z_DEFAULT_STRATEGY) != Z_OK)
{
- fprintf(stderr, _("%s: could not set compression level %i: %s\n"),
+ fprintf(stderr, _("%s: could not set compression level %d: %s\n"),
progname, compresslevel, get_gz_error(ztarfile));
disconnect_and_exit(1);
}
*/
if (r != 512)
{
- fprintf(stderr, _("%s: invalid tar block header size: %i\n"),
+ fprintf(stderr, _("%s: invalid tar block header size: %d\n"),
progname, r);
disconnect_and_exit(1);
}
*/
if (format == 't' && strcmp(basedir, "-") == 0 && PQntuples(res) > 1)
{
- fprintf(stderr, _("%s: can only write single tablespace to stdout, database has %i\n"),
+ fprintf(stderr, _("%s: can only write single tablespace to stdout, database has %d\n"),
progname, PQntuples(res));
disconnect_and_exit(1);
}
return; /* no SSL */
SSL_get_cipher_bits(ssl, &sslbits);
- printf(_("SSL connection (cipher: %s, bits: %i)\n"),
+ printf(_("SSL connection (cipher: %s, bits: %d)\n"),
SSL_get_cipher(ssl), sslbits);
#else
if (!conn->ginbuf.value)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("out of memory allocating GSSAPI buffer (%i)"),
+ libpq_gettext("out of memory allocating GSSAPI buffer (%d)"),
llen);
goto error_return;
}
}
if (!success)
- sprintf(strerrbuf, libpq_gettext("Unknown socket error (0x%08X/%i)"), err, err);
+ sprintf(strerrbuf, libpq_gettext("Unknown socket error (0x%08X/%d)"), err, err);
else
{
strerrbuf[buflen - 1] = '\0';
offs = strlen(strerrbuf);
if (offs > (int) buflen - 64)
offs = buflen - 64;
- sprintf(strerrbuf + offs, " (0x%08X/%i)", err, err);
+ sprintf(strerrbuf + offs, " (0x%08X/%d)", err, err);
}
return strerrbuf;
}
&rootKey) != ERROR_SUCCESS)
{
ereport(LOG,
- (errmsg("could not open registry key to identify system time zone: %i",
+ (errmsg("could not open registry key to identify system time zone: %d",
(int) GetLastError()),
errdetail("The PostgreSQL time zone will be set to \"%s\".",
"GMT"),
if (r == ERROR_NO_MORE_ITEMS)
break;
ereport(LOG,
- (errmsg_internal("could not enumerate registry subkeys to identify system time zone: %i", (int) r)));
+ (errmsg_internal("could not enumerate registry subkeys to identify system time zone: %d", (int) r)));
break;
}
if ((r = RegOpenKeyEx(rootKey, keyname, 0, KEY_READ, &key)) != ERROR_SUCCESS)
{
ereport(LOG,
- (errmsg_internal("could not open registry subkey to identify system time zone: %i", (int) r)));
+ (errmsg_internal("could not open registry subkey to identify system time zone: %d", (int) r)));
break;
}
if ((r = RegQueryValueEx(key, "Std", NULL, NULL, (unsigned char *) zonename, &namesize)) != ERROR_SUCCESS)
{
ereport(LOG,
- (errmsg_internal("could not query value for key \"std\" to identify system time zone \"%s\": %i",
+ (errmsg_internal("could not query value for key \"std\" to identify system time zone \"%s\": %d",
keyname, (int) r)));
RegCloseKey(key);
continue; /* Proceed to look at the next timezone */
if ((r = RegQueryValueEx(key, "Dlt", NULL, NULL, (unsigned char *) zonename, &namesize)) != ERROR_SUCCESS)
{
ereport(LOG,
- (errmsg_internal("could not query value for key \"dlt\" to identify system time zone \"%s\": %i",
+ (errmsg_internal("could not query value for key \"dlt\" to identify system time zone \"%s\": %d",
keyname, (int) r)));
RegCloseKey(key);
continue; /* Proceed to look at the next timezone */