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);
}
use warnings;
use PostgresNode;
use TestLib;
-use Test::More tests => 14;
+use Test::More tests => 15;
my $tempdir = TestLib::tempdir;
my $xlogdir = "$tempdir/pgxlog";
[ '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');