if (!fnameOK)
{
- fprintf(stderr, _("%s: invalid filename input\n"), progname);
+ fprintf(stderr, _("%s: invalid file name argument\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(2);
}
}
else
{
- fprintf(stderr, _("%s: must specify restartfilename\n"), progname);
+ fprintf(stderr, _("%s: must specify oldest kept WAL file\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(2);
}
if (optind < argc)
{
- fprintf(stderr, _("%s: too many parameters\n"), progname);
+ fprintf(stderr, _("%s: too many command-line arguments\n"), progname);
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
exit(2);
}
{
snprintf(WALFilePath, MAXPGPATH, "%s/%s",
archiveLocation, exclusiveCleanupFileName);
- fprintf(stderr, _("%s: keep WAL file \"%s\" and later\n"),
+ fprintf(stderr, _("%s: keeping WAL file \"%s\" and later\n"),
progname, WALFilePath);
}
}
if (lseek(fd, (off_t) (-4), SEEK_END) < 0)
{
- fprintf(stderr, _("%s: could not seek compressed file \"%s\": %s\n"),
+ fprintf(stderr, _("%s: could not seek in compressed file \"%s\": %s\n"),
progname, fullpath, strerror(errno));
disconnect_and_exit(1);
}
if (stream->walmethod->sync(f) != 0)
{
fprintf(stderr,
- _("%s: could not sync existing write-ahead log file \"%s\": %s\n"),
+ _("%s: could not fsync existing write-ahead log file \"%s\": %s\n"),
progname, fn, stream->walmethod->getlasterror());
stream->walmethod->close(f, CLOSE_UNLINK);
return false;
if (errno == 0)
errno = ENOSPC;
fprintf(stderr,
- _("%s: write-ahead log file \"%s\" has %d bytes, should be 0 or %d\n"),
+ ngettext("%s: write-ahead log file \"%s\" has %d byte, should be 0 or %d\n",
+ "%s: write-ahead log file \"%s\" has %d bytes, should be 0 or %d\n",
+ size),
progname, fn, (int) size, XLogSegSize);
return false;
}
r = deflate(tar_data->zp, flush ? Z_FINISH : Z_NO_FLUSH);
if (r == Z_STREAM_ERROR)
{
- tar_set_error("deflate failed");
+ tar_set_error("could not compress data");
return false;
}
/* Reset the stream for writing */
if (deflateReset(tar_data->zp) != Z_OK)
{
- tar_set_error("deflateReset failed");
+ tar_set_error("could not reset compression stream");
return false;
}
}
{
pg_free(tar_data->zp);
tar_data->zp = NULL;
- tar_set_error("deflateInit2 failed");
+ tar_set_error("could not initialize compression library");
return NULL;
}
}
Assert(tar_data->currentfile == NULL);
if (tar_data->currentfile != NULL)
{
- tar_set_error("implementation error: tar files can't have more than one open file\n");
+ tar_set_error("implementation error: tar files can't have more than one open file");
return NULL;
}
/* Turn off compression for header */
if (deflateParams(tar_data->zp, 0, 0) != Z_OK)
{
- tar_set_error("deflateParams failed");
+ tar_set_error("could not change compression parameters");
return NULL;
}
}
/* Re-enable compression for the rest of the file */
if (deflateParams(tar_data->zp, tar_data->compression, 0) != Z_OK)
{
- tar_set_error("deflateParams failed");
+ tar_set_error("could not change compression parameters");
return NULL;
}
}
/* Turn off compression */
if (deflateParams(tar_data->zp, 0, 0) != Z_OK)
{
- tar_set_error("deflateParams failed");
+ tar_set_error("could not change compression parameters");
return -1;
}
/* Turn compression back on */
if (deflateParams(tar_data->zp, tar_data->compression, 0) != Z_OK)
{
- tar_set_error("deflateParams failed");
+ tar_set_error("could not change compression parameters");
return -1;
}
}
if (r == Z_STREAM_ERROR)
{
- tar_set_error("deflate failed");
+ tar_set_error("could not compress data");
return false;
}
if (tar_data->zp->avail_out < ZLIB_OUT_SIZE)
if (deflateEnd(tar_data->zp) != Z_OK)
{
- tar_set_error("deflateEnd failed");
+ tar_set_error("could not close compression stream");
return false;
}
}
if (!pg_frontend_random(raw_nonce, SCRAM_RAW_NONCE_LEN))
{
printfPQExpBuffer(errormessage,
- libpq_gettext("failed to generate nonce\n"));
+ libpq_gettext("could not generate nonce\n"));
return NULL;
}
return [[1,2,3],[4,5]]
$$ LANGUAGE plpythonu;
SELECT * FROM test_type_conversion_mdarray_malformed();
-ERROR: multidimensional arrays must have array expressions with matching dimensions. PL/Python function return value has sequence length 2 while expected 3
+ERROR: wrong length of inner sequence: has length 2, but 3 was expected
+DETAIL: To construct a multidimensional array, the inner sequences must all have the same length.
CONTEXT: while creating return value
PL/Python function "test_type_conversion_mdarray_malformed"
CREATE FUNCTION test_type_conversion_mdarray_toodeep() RETURNS int[] AS $$
return [[1,2,3],[4,5]]
$$ LANGUAGE plpython3u;
SELECT * FROM test_type_conversion_mdarray_malformed();
-ERROR: multidimensional arrays must have array expressions with matching dimensions. PL/Python function return value has sequence length 2 while expected 3
+ERROR: wrong length of inner sequence: has length 2, but 3 was expected
+DETAIL: To construct a multidimensional array, the inner sequences must all have the same length.
CONTEXT: while creating return value
PL/Python function "test_type_conversion_mdarray_malformed"
CREATE FUNCTION test_type_conversion_mdarray_toodeep() RETURNS int[] AS $$
dims[ndim] = PySequence_Length(pyptr);
if (dims[ndim] < 0)
- PLy_elog(ERROR, "cannot determine sequence length for function return value");
+ PLy_elog(ERROR, "could not determine sequence length for function return value");
if (dims[ndim] > MaxAllocSize)
PLy_elog(ERROR, "array size exceeds the maximum allowed");
int i;
if (PySequence_Length(list) != dims[dim])
- PLy_elog(ERROR,
- "multidimensional arrays must have array expressions with matching dimensions. "
- "PL/Python function return value has sequence length %d while expected %d",
- (int) PySequence_Length(list), dims[dim]);
+ ereport(ERROR,
+ (errmsg("wrong length of inner sequence: has length %d, but %d was expected",
+ (int) PySequence_Length(list), dims[dim]),
+ (errdetail("To construct a multidimensional array, the inner sequences must all have the same length."))));
if (dim < ndim - 1)
{