1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Make pg_upgrade output more consistent with project style

Add errno-based output to error messages where appropriate, reformat
blocks to about 72 characters per line, use spaces instead of tabs for
indentation, and other style adjustments.
This commit is contained in:
Peter Eisentraut
2011-07-12 07:13:51 +03:00
parent afc9635c60
commit 912bc4f038
14 changed files with 155 additions and 176 deletions

View File

@ -74,7 +74,7 @@ setupPageConverter(pageCnvCtx **result)
*/
if ((converter = loadConverterPlugin(newPageVersion, oldPageVersion)) == NULL)
return "can't find plugin to convert from old page layout to new page layout";
return "could not find plugin to convert from old page layout to new page layout";
else
{
*result = converter;
@ -100,12 +100,12 @@ getPageVersion(uint16 *version, const char *pathName)
ssize_t bytesRead;
if ((relfd = open(pathName, O_RDONLY, 0)) < 0)
return "can't open relation";
return "could not open relation";
if ((bytesRead = read(relfd, &page, sizeof(page))) != sizeof(page))
{
close(relfd);
return "can't read page header";
return "could not read page header";
}
*version = PageGetPageLayoutVersion(&page);