diff options
author | Stephen Frost <sfrost@snowman.net> | 2016-05-08 12:58:21 -0400 |
---|---|---|
committer | Stephen Frost <sfrost@snowman.net> | 2016-05-08 12:58:21 -0400 |
commit | 6f69b96390eddf9c6129840eac511fd4159f01bb (patch) | |
tree | 8b44ebcf7ffa2ab6226918e236b04319b35af042 /src | |
parent | 7df974ee0bfd8978830b941e7af5697fd4268656 (diff) | |
download | postgresql-6f69b96390eddf9c6129840eac511fd4159f01bb.tar.gz postgresql-6f69b96390eddf9c6129840eac511fd4159f01bb.zip |
Wording quibbles regarding initdb username
Use disallowed instead of reserved, cannot instead of can not, and
double quotes instead of single quotes.
Also add a test to cover the bug which started this discussion.
Per discussion with Tom.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/initdb/initdb.c | 2 | ||||
-rw-r--r-- | src/bin/initdb/t/001_initdb.pl | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 7dedd8adc63..ec8c38ed5a4 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -3564,7 +3564,7 @@ main(int argc, char *argv[]) if (strncmp(username, "pg_", 3) == 0) { - fprintf(stderr, _("%s: superuser name \"%s\" is reserved; role names can not begin with 'pg_'\n"), progname, username); + fprintf(stderr, _("%s: superuser name \"%s\" is disallowed; role names cannot begin with \"pg_\"\n"), progname, username); exit(1); } diff --git a/src/bin/initdb/t/001_initdb.pl b/src/bin/initdb/t/001_initdb.pl index f64186d6373..8cf762a19cc 100644 --- a/src/bin/initdb/t/001_initdb.pl +++ b/src/bin/initdb/t/001_initdb.pl @@ -6,7 +6,7 @@ use strict; use warnings; use PostgresNode; use TestLib; -use Test::More tests => 14; +use Test::More tests => 15; my $tempdir = TestLib::tempdir; my $xlogdir = "$tempdir/pgxlog"; @@ -29,6 +29,10 @@ command_fails( [ 'initdb', '-X', 'pgxlog', $datadir ], 'relative xlog directory not allowed'); +command_fails( + [ 'initdb', '-U', 'pg_test', $datadir ], + 'role names cannot being with "pg_"'); + mkdir $datadir; command_ok([ 'initdb', '-N', '-T', 'german', '-X', $xlogdir, $datadir ], 'successful creation'); |