Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2333803

Browse files
committed
Use "data directory" not "current directory" in error messages.
The user receiving the message might not understand where theserver's "current directory" is. "Data directory" seems clearer.(This would not be good for frontend code, but both of thesemessages are only issued in the backend.)Kyotaro HoriguchiDiscussion:https://postgr.es/m/20230316.111646.1564684434328830712.horikyota.ntt@gmail.com
1 parent442f870 commit2333803

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎contrib/adminpack/adminpack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ convert_and_check_filename(text *arg)
9797
elseif (!path_is_relative_and_below_cwd(filename))
9898
ereport(ERROR,
9999
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
100-
errmsg("path must be in or below thecurrent directory")));
100+
errmsg("path must be in or below thedata directory")));
101101

102102
returnfilename;
103103
}

‎contrib/adminpack/expected/adminpack.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ GRANT pg_read_all_settings TO regress_adminpack_user1;
4141
GRANT EXECUTE ON FUNCTION pg_file_write(text,text,bool) TO regress_adminpack_user1;
4242
SET ROLE regress_adminpack_user1;
4343
SELECT pg_file_write('../test_file0', 'test0', false);
44-
ERROR: path must be in or below thecurrent directory
44+
ERROR: path must be in or below thedata directory
4545
SELECT pg_file_write('/tmp/test_file0', 'test0', false);
4646
ERROR: absolute path not allowed
4747
SELECT pg_file_write(current_setting('data_directory') || '/test_file4', 'test4', false);

‎src/backend/utils/adt/genfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ convert_and_check_filename(text *arg)
8686
elseif (!path_is_relative_and_below_cwd(filename))
8787
ereport(ERROR,
8888
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
89-
errmsg("path must be in or below thecurrent directory")));
89+
errmsg("path must be in or below thedata directory")));
9090

9191
returnfilename;
9292
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp