if (stat(filename, &fst) >= 0)
ereport(ERROR,
- (ERRCODE_DUPLICATE_FILE,
+ (errcode(ERRCODE_DUPLICATE_FILE),
errmsg("file \"%s\" exists", filename)));
f = AllocateFile(filename, "wb");
if (rc >= 0 || errno != ENOENT)
{
ereport(ERROR,
- (ERRCODE_DUPLICATE_FILE,
+ (errcode(ERRCODE_DUPLICATE_FILE),
errmsg("cannot rename to target file \"%s\"",
fn3 ? fn3 : fn2)));
}
else
{
ereport(ERROR,
- (ERRCODE_UNDEFINED_FILE,
+ (errcode(ERRCODE_UNDEFINED_FILE),
errmsg("renaming \"%s\" to \"%s\" was reverted",
fn2, fn3)));
}
if (checksum_failure)
{
ereport(WARNING,
- (ERRCODE_DATA_CORRUPTED,
+ (errcode(ERRCODE_DATA_CORRUPTED),
errmsg("page verification failed, calculated checksum %u but expected %u",
checksum, p->pd_checksum)));