Skip to content

Commit fa132db

Browse files
committed
The execution of regression tests is simplified
* `allow_in_place_tablespaces` is used to fix running regression tests locally Signed-off-by: Daymel Bonne Solís <[email protected]>
1 parent b5c0d95 commit fa132db

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

regress/expected/tablespace.out

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ SET client_min_messages = warning;
44
--
55
-- Note: in order to pass this test you must create a tablespace called 'testts'
66
--
7+
SET allow_in_place_tablespaces = true;
8+
CREATE TABLESPACE testts LOCATION '';
79
SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
810
spcname
911
---------
@@ -23,11 +25,11 @@ SELECT regexp_replace(
2325
'_[0-9]+', '_OID', 'g')
2426
FROM pg_index i join pg_class c ON c.oid = indexrelid
2527
WHERE indrelid = 'testts1'::regclass ORDER BY relname;
26-
regexp_replace
27-
----------------------------------------------------------------------------------------------------------
28-
CREATE INDEX index_OID ON repack.table_OID USING btree (id) TABLESPACE pg_default WHERE (id > 0)
29-
CREATE UNIQUE INDEX index_OID ON repack.table_OID USING btree (id) TABLESPACE pg_default
30-
CREATE INDEX index_OID ON repack.table_OID USING btree (id) WITH (fillfactor='80') TABLESPACE pg_default
28+
regexp_replace
29+
------------------------------------------------------------------------------------
30+
CREATE INDEX index_OID ON repack.table_OID USING btree (id) WHERE (id > 0)
31+
CREATE UNIQUE INDEX index_OID ON repack.table_OID USING btree (id)
32+
CREATE INDEX index_OID ON repack.table_OID USING btree (id) WITH (fillfactor='80')
3133
(3 rows)
3234

3335
SELECT regexp_replace(
@@ -47,23 +49,23 @@ SELECT regexp_replace(
4749
'_[0-9]+', '_OID', 'g')
4850
FROM pg_index i join pg_class c ON c.oid = indexrelid
4951
WHERE indrelid = 'testts1'::regclass ORDER BY relname;
50-
regexp_replace
51-
--------------------------------------------------------------------------------------------------------------
52-
CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE pg_default WHERE (id > 0)
53-
CREATE UNIQUE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE pg_default
54-
CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) WITH (fillfactor='80') TABLESPACE pg_default
52+
regexp_replace
53+
-----------------------------------------------------------------------------------------------
54+
CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) WHERE (id > 0)
55+
CREATE UNIQUE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id)
56+
CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) WITH (fillfactor='80')
5557
(3 rows)
5658

5759
SELECT regexp_replace(
5860
repack.repack_indexdef(indexrelid, 'testts1'::regclass, 'foo', true),
5961
'_[0-9]+', '_OID', 'g')
6062
FROM pg_index i join pg_class c ON c.oid = indexrelid
6163
WHERE indrelid = 'testts1'::regclass ORDER BY relname;
62-
regexp_replace
63-
-------------------------------------------------------------------------------------------------------
64-
CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE foo WHERE (id > 0)
65-
CREATE UNIQUE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE foo
66-
CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) WITH (fillfactor='80') TABLESPACE foo
64+
regexp_replace
65+
--------------------------------------------------------------------------------------------------------------
66+
CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) TABLESPACE foo WHERE (id > 0)
67+
CREATE UNIQUE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) TABLESPACE foo
68+
CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) WITH (fillfactor='80') TABLESPACE foo
6769
(3 rows)
6870

6971
-- Test that a tablespace is quoted as an identifier

regress/sql/tablespace.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ SET client_min_messages = warning;
55
--
66
-- Note: in order to pass this test you must create a tablespace called 'testts'
77
--
8+
SET allow_in_place_tablespaces = true;
9+
CREATE TABLESPACE testts LOCATION '';
810

911
SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
1012
-- If the query above failed you must create the 'testts' tablespace;

0 commit comments

Comments
 (0)