File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/test/regress/expected Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,9 @@ INSERT INTO clstr_2 VALUES (2);
302302INSERT INTO clstr_2 VALUES (1);
303303INSERT INTO clstr_3 VALUES (2);
304304INSERT INTO clstr_3 VALUES (1);
305+ -- "CLUSTER <tablename>" on a table that hasn't been clustered
306+ CLUSTER clstr_2;
307+ ERROR: CLUSTER: No previously clustered index found on table clstr_2
305308CLUSTER clstr_1_pkey ON clstr_1;
306309CLUSTER clstr_2_pkey ON clstr_2;
307310SELECT * FROM clstr_1 UNION ALL
@@ -344,6 +347,18 @@ SELECT * FROM clstr_1 UNION ALL
344347 1
345348(6 rows)
346349
350+ -- cluster a single table using the indisclustered bit previously set
351+ DELETE FROM clstr_1;
352+ INSERT INTO clstr_1 VALUES (2);
353+ INSERT INTO clstr_1 VALUES (1);
354+ CLUSTER clstr_1;
355+ SELECT * FROM clstr_1;
356+ a
357+ ---
358+ 1
359+ 2
360+ (2 rows)
361+
347362-- clean up
348363\c -
349364DROP TABLE clstr_1;
You can’t perform that action at this time.
0 commit comments