Fixed --order-by broken by namespaces refactoring
Also added a regression test for it. Bug and patch from Beena Emerson, thany you.
This commit is contained in:
parent
109689586e
commit
f886e0dba6
@ -78,3 +78,6 @@ ORDER BY relname;
|
|||||||
ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
|
ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
|
||||||
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -S
|
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -S
|
||||||
ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
|
ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
|
||||||
|
-- not broken with order
|
||||||
|
\! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx
|
||||||
|
INFO: repacking table "testts1"
|
||||||
|
@ -617,6 +617,7 @@ repack_one_database(const char *orderby, char *errbuf, size_t errsize)
|
|||||||
/* User specified ORDER BY */
|
/* User specified ORDER BY */
|
||||||
appendStringInfoString(&sql, " ORDER BY ");
|
appendStringInfoString(&sql, " ORDER BY ");
|
||||||
appendStringInfoString(&sql, orderby);
|
appendStringInfoString(&sql, orderby);
|
||||||
|
table.create_table = sql.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
repack_one_table(&table, orderby);
|
repack_one_table(&table, orderby);
|
||||||
|
@ -53,3 +53,5 @@ ORDER BY relname;
|
|||||||
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --moveidx
|
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --moveidx
|
||||||
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -S
|
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -S
|
||||||
|
|
||||||
|
-- not broken with order
|
||||||
|
\! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user