Fix CLUSTER regression failure caused by new patch, from Neil Conway
authorBruce Momjian
Sat, 16 Nov 2002 03:25:22 +0000 (03:25 +0000)
committerBruce Momjian
Sat, 16 Nov 2002 03:25:22 +0000 (03:25 +0000)
src/test/regress/expected/cluster.out

index ee39c3a8482e0ffa47db040cc069f82adb5882c3..f537f00a5ce9f83da2706a8773828be41d341766 100644 (file)
@@ -302,6 +302,9 @@ INSERT INTO clstr_2 VALUES (2);
 INSERT INTO clstr_2 VALUES (1);
 INSERT INTO clstr_3 VALUES (2);
 INSERT INTO clstr_3 VALUES (1);
+-- "CLUSTER " on a table that hasn't been clustered
+CLUSTER clstr_2;
+ERROR:  CLUSTER: No previously clustered index found on table clstr_2
 CLUSTER clstr_1_pkey ON clstr_1;
 CLUSTER clstr_2_pkey ON clstr_2;
 SELECT * FROM clstr_1 UNION ALL
@@ -344,6 +347,18 @@ SELECT * FROM clstr_1 UNION ALL
  1
 (6 rows)
 
+-- cluster a single table using the indisclustered bit previously set
+DELETE FROM clstr_1;
+INSERT INTO clstr_1 VALUES (2);
+INSERT INTO clstr_1 VALUES (1);
+CLUSTER clstr_1;
+SELECT * FROM clstr_1;
+ a 
+---
+ 1
+ 2
+(2 rows)
+
 -- clean up
 \c -
 DROP TABLE clstr_1;