Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59bd7f5

Browse files
committed
move DROP INDEX CONCURRENTLY test to a proper place
1 parent7e22540 commit59bd7f5

File tree

4 files changed

+34
-38
lines changed

4 files changed

+34
-38
lines changed

‎expected/pathman_calamity.out

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,25 +1043,6 @@ SELECT context, entries FROM pathman_cache_stats ORDER BY context;/* OK */
10431043

10441044
DROP SCHEMA calamity CASCADE;
10451045
DROP EXTENSION pg_pathman;
1046-
/*
1047-
* -----------------------------------------------------------
1048-
* Special tests (drop index concurrently to test snapshots)
1049-
* -----------------------------------------------------------
1050-
*/
1051-
CREATE SCHEMA calamity;
1052-
CREATE EXTENSION pg_pathman;
1053-
CREATE TABLE calamity.drop_index (val INT4 NOT NULL);
1054-
CREATE INDEX ON calamity.drop_index (val);
1055-
SELECT create_hash_partitions('calamity.drop_index', 'val', 2);
1056-
create_hash_partitions
1057-
------------------------
1058-
2
1059-
(1 row)
1060-
1061-
DROP INDEX CONCURRENTLY calamity.drop_index_0_val_idx;
1062-
DROP SCHEMA calamity CASCADE;
1063-
NOTICE: drop cascades to 3 other objects
1064-
DROP EXTENSION pg_pathman;
10651046
/*
10661047
* ------------------------------------------
10671048
* Special tests (uninitialized pg_pathman)

‎expected/pathman_utility_stmt.out

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,19 @@ WHERE r.conrelid = 'rename.plain_test'::regclass AND r.contype = 'c';
366366

367367
DROP SCHEMA rename CASCADE;
368368
NOTICE: drop cascades to 7 other objects
369+
/*
370+
* Test DROP INDEX CONCURRENTLY (test snapshots)
371+
*/
372+
CREATE SCHEMA drop_index;
373+
CREATE TABLE drop_index.test (val INT4 NOT NULL);
374+
CREATE INDEX ON drop_index.test (val);
375+
SELECT create_hash_partitions('drop_index.test', 'val', 2);
376+
create_hash_partitions
377+
------------------------
378+
2
379+
(1 row)
380+
381+
DROP INDEX CONCURRENTLY drop_index.test_0_val_idx;
382+
DROP SCHEMA drop_index CASCADE;
383+
NOTICE: drop cascades to 3 other objects
369384
DROP EXTENSION pg_pathman;

‎sql/pathman_calamity.sql

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -422,25 +422,6 @@ DROP EXTENSION pg_pathman;
422422

423423

424424

425-
/*
426-
* -----------------------------------------------------------
427-
* Special tests (drop index concurrently to test snapshots)
428-
* -----------------------------------------------------------
429-
*/
430-
431-
CREATESCHEMAcalamity;
432-
CREATE EXTENSION pg_pathman;
433-
434-
CREATETABLEcalamity.drop_index (val INT4NOT NULL);
435-
CREATEINDEXONcalamity.drop_index (val);
436-
SELECT create_hash_partitions('calamity.drop_index','val',2);
437-
DROPINDEX CONCURRENTLYcalamity.drop_index_0_val_idx;
438-
439-
DROPSCHEMA calamity CASCADE;
440-
DROP EXTENSION pg_pathman;
441-
442-
443-
444425
/*
445426
* ------------------------------------------
446427
* Special tests (uninitialized pg_pathman)

‎sql/pathman_utility_stmt.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
CREATE EXTENSION pg_pathman;
44

5+
6+
57
/*
68
* Test COPY
79
*/
@@ -159,6 +161,7 @@ SELECT COUNT(*) FROM copy_stmt_hooking.test2;
159161
DROPSCHEMA copy_stmt_hooking CASCADE;
160162

161163

164+
162165
/*
163166
* Test auto check constraint renaming
164167
*/
@@ -215,4 +218,20 @@ WHERE r.conrelid = 'rename.plain_test'::regclass AND r.contype = 'c';
215218

216219
DROPSCHEMA rename CASCADE;
217220

221+
222+
223+
/*
224+
* Test DROP INDEX CONCURRENTLY (test snapshots)
225+
*/
226+
CREATESCHEMAdrop_index;
227+
228+
CREATETABLEdrop_index.test (val INT4NOT NULL);
229+
CREATEINDEXONdrop_index.test (val);
230+
SELECT create_hash_partitions('drop_index.test','val',2);
231+
DROPINDEX CONCURRENTLYdrop_index.test_0_val_idx;
232+
233+
DROPSCHEMA drop_index CASCADE;
234+
235+
236+
218237
DROP EXTENSION pg_pathman;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp