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

Commit6f69b96

Browse files
committed
Wording quibbles regarding initdb username
Use disallowed instead of reserved, cannot instead of can not, anddouble quotes instead of single quotes.Also add a test to cover the bug which started this discussion.Per discussion with Tom.
1 parent7df974e commit6f69b96

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3564,7 +3564,7 @@ main(int argc, char *argv[])
35643564

35653565
if (strncmp(username,"pg_",3)==0)
35663566
{
3567-
fprintf(stderr,_("%s: superuser name \"%s\" isreserved; role namescan notbegin with'pg_'\n"),progname,username);
3567+
fprintf(stderr,_("%s: superuser name \"%s\" isdisallowed; role namescannotbegin with\"pg_\"\n"),progname,username);
35683568
exit(1);
35693569
}
35703570

‎src/bin/initdb/t/001_initdb.pl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use warnings;
77
use PostgresNode;
88
use TestLib;
9-
use Test::Moretests=>14;
9+
use Test::Moretests=>15;
1010

1111
my$tempdir = TestLib::tempdir;
1212
my$xlogdir ="$tempdir/pgxlog";
@@ -29,6 +29,10 @@
2929
['initdb','-X','pgxlog',$datadir ],
3030
'relative xlog directory not allowed');
3131

32+
command_fails(
33+
['initdb','-U','pg_test',$datadir ],
34+
'role names cannot being with "pg_"');
35+
3236
mkdir$datadir;
3337
command_ok(['initdb','-N','-T','german','-X',$xlogdir,$datadir ],
3438
'successful creation');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp