summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Vondra2017-01-22 16:22:43 +0000
committerTomas Vondra2017-01-22 16:22:43 +0000
commit7f6a8fa3e469cd747ecf815dc272d92ddfc0b99e (patch)
treed457623e4c18a8fba89a8dc2c84128a19702cffa
parentc36051e5bcca1065fa1f0daba484f1f62e824c65 (diff)
fix cluster regression test by properly distributing the clstr_tst
Without the DISTRIBUTE BY clause, the table was distributed by the first column, resulting in a failure due to the foreign key.
-rw-r--r--src/test/regress/sql/cluster.sql5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/regress/sql/cluster.sql b/src/test/regress/sql/cluster.sql
index 3532c360c1..68435a8427 100644
--- a/src/test/regress/sql/cluster.sql
+++ b/src/test/regress/sql/cluster.sql
@@ -5,11 +5,12 @@
CREATE TABLE clstr_tst_s (rf_a SERIAL PRIMARY KEY,
b INT);
-CREATE TABLE clstr_tst (a SERIAL PRIMARY KEY,
+CREATE TABLE clstr_tst (a SERIAL,
b INT,
c TEXT,
d TEXT,
- CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s);
+ CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s)
+ DISTRIBUTE BY (clstr_tst_con);
CREATE INDEX clstr_tst_b ON clstr_tst (b);
CREATE INDEX clstr_tst_c ON clstr_tst (c);