Fix existing 'tablespace' regression test so it passes again.

Changes to repack_indexdef() had broken this test.
This commit is contained in:
Josh Kupershmidt 2013-06-22 06:47:06 -04:00
parent f3fa2fa563
commit b804c150ac
3 changed files with 8 additions and 7 deletions

View File

@ -666,6 +666,7 @@ repack_get_order_by(PG_FUNCTION_ARGS)
* @param index Oid of target index. * @param index Oid of target index.
* @param table Oid of table of the index. * @param table Oid of table of the index.
* @param tablespace Namespace for the index. If NULL keep the original. * @param tablespace Namespace for the index. If NULL keep the original.
* @param boolean Whether to use CONCURRENTLY when creating the index.
* @retval Create index DDL for temp table. * @retval Create index DDL for temp table.
*/ */
Datum Datum

View File

@ -19,7 +19,7 @@ INSERT INTO testts1 (data) values ('b');
INSERT INTO testts1 (data) values ('c'); INSERT INTO testts1 (data) values ('c');
-- check the indexes definitions -- check the indexes definitions
SELECT regexp_replace( SELECT regexp_replace(
repack.repack_indexdef(indexrelid, 'testts1'::regclass, NULL), repack.repack_indexdef(indexrelid, 'testts1'::regclass, NULL, false),
'_[0-9]+', '_OID', 'g') '_[0-9]+', '_OID', 'g')
FROM pg_index i join pg_class c ON c.oid = indexrelid FROM pg_index i join pg_class c ON c.oid = indexrelid
WHERE indrelid = 'testts1'::regclass ORDER BY relname; WHERE indrelid = 'testts1'::regclass ORDER BY relname;
@ -31,7 +31,7 @@ WHERE indrelid = 'testts1'::regclass ORDER BY relname;
(3 rows) (3 rows)
SELECT regexp_replace( SELECT regexp_replace(
repack.repack_indexdef(indexrelid, 'testts1'::regclass, 'foo'), repack.repack_indexdef(indexrelid, 'testts1'::regclass, 'foo', false),
'_[0-9]+', '_OID', 'g') '_[0-9]+', '_OID', 'g')
FROM pg_index i join pg_class c ON c.oid = indexrelid FROM pg_index i join pg_class c ON c.oid = indexrelid
WHERE indrelid = 'testts1'::regclass ORDER BY relname; WHERE indrelid = 'testts1'::regclass ORDER BY relname;

View File

@ -18,13 +18,13 @@ INSERT INTO testts1 (data) values ('c');
-- check the indexes definitions -- check the indexes definitions
SELECT regexp_replace( SELECT regexp_replace(
repack.repack_indexdef(indexrelid, 'testts1'::regclass, NULL), repack.repack_indexdef(indexrelid, 'testts1'::regclass, NULL, false),
'_[0-9]+', '_OID', 'g') '_[0-9]+', '_OID', 'g')
FROM pg_index i join pg_class c ON c.oid = indexrelid FROM pg_index i join pg_class c ON c.oid = indexrelid
WHERE indrelid = 'testts1'::regclass ORDER BY relname; WHERE indrelid = 'testts1'::regclass ORDER BY relname;
SELECT regexp_replace( SELECT regexp_replace(
repack.repack_indexdef(indexrelid, 'testts1'::regclass, 'foo'), repack.repack_indexdef(indexrelid, 'testts1'::regclass, 'foo', false),
'_[0-9]+', '_OID', 'g') '_[0-9]+', '_OID', 'g')
FROM pg_index i join pg_class c ON c.oid = indexrelid FROM pg_index i join pg_class c ON c.oid = indexrelid
WHERE indrelid = 'testts1'::regclass ORDER BY relname; WHERE indrelid = 'testts1'::regclass ORDER BY relname;