system_or_bail "rm -rf '$tempdir'/*";
-command_ok([ 'initdb', "$tempdir/data", '-X', "$tempdir/pgxlog" ],
+command_ok([ 'initdb', '-X', "$tempdir/pgxlog", "$tempdir/data" ],
'separate xlog directory');
system_or_bail "rm -rf '$tempdir'/*";
system_or_bail "rm -rf '$tempdir'/*";
mkdir "$tempdir/pgxlog";
-command_ok([ 'initdb', "$tempdir/data", '-X', "$tempdir/pgxlog" ],
+command_ok([ 'initdb', '-X', "$tempdir/pgxlog", "$tempdir/data" ],
'existing empty xlog directory');
system_or_bail "rm -rf '$tempdir'/*";
mkdir "$tempdir/pgxlog";
mkdir "$tempdir/pgxlog/lost+found";
-command_fails([ 'initdb', "$tempdir/data", '-X', "$tempdir/pgxlog" ],
+command_fails([ 'initdb', '-X', "$tempdir/pgxlog", "$tempdir/data" ],
'existing nonempty xlog directory');
system_or_bail "rm -rf '$tempdir'/*";
-command_ok([ 'initdb', "$tempdir/data", '-T', 'german' ],
+command_ok([ 'initdb', '-T', 'german', "$tempdir/data" ],
'select default dictionary');
psql 'postgres',
'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x';
issues_sql_like(
- [ 'clusterdb', 'postgres', '-t', 'test1' ],
+ [ 'clusterdb', '-t', 'test1', 'postgres' ],
qr/statement: CLUSTER test1;/,
'cluster specific table');
qr/statement: CREATE DATABASE foobar1/,
'SQL CREATE DATABASE run');
issues_sql_like(
- [ 'createdb', 'foobar2', '-l', 'C', '-E', 'LATIN1', '-T', 'template0' ],
+ [ 'createdb', '-l', 'C', '-E', 'LATIN1', '-T', 'template0', 'foobar2' ],
qr/statement: CREATE DATABASE foobar2 ENCODING 'LATIN1'/,
'create database with encoding');
psql 'postgres',
'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a);';
issues_sql_like(
- [ 'reindexdb', 'postgres', '-t', 'test1' ],
+ [ 'reindexdb', '-t', 'test1', 'postgres' ],
qr/statement: REINDEX TABLE test1;/,
'reindex specific table');
issues_sql_like(
- [ 'reindexdb', 'postgres', '-i', 'test1x' ],
+ [ 'reindexdb', '-i', 'test1x', 'postgres' ],
qr/statement: REINDEX INDEX test1x;/,
'reindex specific index');
issues_sql_like(
- [ 'reindexdb', 'postgres', '-S', 'pg_catalog' ],
+ [ 'reindexdb', '-S', 'pg_catalog', 'postgres' ],
qr/statement: REINDEX SCHEMA pg_catalog;/,
'reindex specific schema');
issues_sql_like(
- [ 'reindexdb', 'postgres', '-s' ],
+ [ 'reindexdb', '-s', 'postgres' ],
qr/statement: REINDEX SYSTEM postgres;/,
'reindex system tables');