1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00

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.
This commit is contained in:
Stephen Frost 2016-05-08 12:58:21 -04:00
parent 7df974ee0b
commit 6f69b96390
2 changed files with 6 additions and 2 deletions

View File

@ -3564,7 +3564,7 @@ main(int argc, char *argv[])
if (strncmp(username, "pg_", 3) == 0) 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); exit(1);
} }

View File

@ -6,7 +6,7 @@ use strict;
use warnings; use warnings;
use PostgresNode; use PostgresNode;
use TestLib; use TestLib;
use Test::More tests => 14; use Test::More tests => 15;
my $tempdir = TestLib::tempdir; my $tempdir = TestLib::tempdir;
my $xlogdir = "$tempdir/pgxlog"; my $xlogdir = "$tempdir/pgxlog";
@ -29,6 +29,10 @@ command_fails(
[ 'initdb', '-X', 'pgxlog', $datadir ], [ 'initdb', '-X', 'pgxlog', $datadir ],
'relative xlog directory not allowed'); 'relative xlog directory not allowed');
command_fails(
[ 'initdb', '-U', 'pg_test', $datadir ],
'role names cannot being with "pg_"');
mkdir $datadir; mkdir $datadir;
command_ok([ 'initdb', '-N', '-T', 'german', '-X', $xlogdir, $datadir ], command_ok([ 'initdb', '-N', '-T', 'german', '-X', $xlogdir, $datadir ],
'successful creation'); 'successful creation');