File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ pg_file_write(PG_FUNCTION_ARGS)
128
128
129
129
if (stat (filename , & fst ) >= 0 )
130
130
ereport (ERROR ,
131
- (ERRCODE_DUPLICATE_FILE ,
131
+ (errcode ( ERRCODE_DUPLICATE_FILE ) ,
132
132
errmsg ("file \"%s\" exists" , filename )));
133
133
134
134
f = AllocateFile (filename , "wb" );
@@ -194,7 +194,7 @@ pg_file_rename(PG_FUNCTION_ARGS)
194
194
if (rc >= 0 || errno != ENOENT )
195
195
{
196
196
ereport (ERROR ,
197
- (ERRCODE_DUPLICATE_FILE ,
197
+ (errcode ( ERRCODE_DUPLICATE_FILE ) ,
198
198
errmsg ("cannot rename to target file \"%s\"" ,
199
199
fn3 ? fn3 : fn2 )));
200
200
}
@@ -225,7 +225,7 @@ pg_file_rename(PG_FUNCTION_ARGS)
225
225
else
226
226
{
227
227
ereport (ERROR ,
228
- (ERRCODE_UNDEFINED_FILE ,
228
+ (errcode ( ERRCODE_UNDEFINED_FILE ) ,
229
229
errmsg ("renaming \"%s\" to \"%s\" was reverted" ,
230
230
fn2 , fn3 )));
231
231
}
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ PageIsVerified(Page page, BlockNumber blkno)
147
147
if (checksum_failure )
148
148
{
149
149
ereport (WARNING ,
150
- (ERRCODE_DATA_CORRUPTED ,
150
+ (errcode ( ERRCODE_DATA_CORRUPTED ) ,
151
151
errmsg ("page verification failed, calculated checksum %u but expected %u" ,
152
152
checksum , p -> pd_checksum )));
153
153
You can’t perform that action at this time.
0 commit comments