We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent24b130c commit00e59b5Copy full SHA for 00e59b5
src/test/regress/expected/cluster.out
@@ -302,6 +302,9 @@ INSERT INTO clstr_2 VALUES (2);
302
INSERT INTO clstr_2 VALUES (1);
303
INSERT INTO clstr_3 VALUES (2);
304
INSERT 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
308
CLUSTER clstr_1_pkey ON clstr_1;
309
CLUSTER clstr_2_pkey ON clstr_2;
310
SELECT * FROM clstr_1 UNION ALL
@@ -344,6 +347,18 @@ SELECT * FROM clstr_1 UNION ALL
344
347
1
345
348
(6 rows)
346
349
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
+
362
-- clean up
363
\c -
364
DROP TABLE clstr_1;