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

Commit66f4191

Browse files
committed
calamity tests for function drop_range_partition_expand_next()
1 parent52375ca commit66f4191

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

‎expected/pathman_calamity.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,15 @@ SELECT build_update_trigger_func_name(NULL) IS NULL;
355355
/* check function stop_concurrent_part_task() */
356356
SELECT stop_concurrent_part_task(1::regclass);
357357
ERROR: cannot find worker for relation "1"
358+
/* check function drop_range_partition_expand_next() */
359+
SELECT drop_range_partition_expand_next('pg_class');
360+
ERROR: relation "pg_class" is not a partition
361+
SELECT drop_range_partition_expand_next(NULL) IS NULL;
362+
?column?
363+
----------
364+
t
365+
(1 row)
366+
358367
/* check invoke_on_partition_created_callback() for RANGE */
359368
SELECT invoke_on_partition_created_callback('calamity.part_test', 'calamity.part_test', 1, NULL, NULL::int);
360369
ERROR: both bounds must be provided for RANGE partition

‎sql/pathman_calamity.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ SELECT build_update_trigger_func_name(NULL) IS NULL;
124124
/* check function stop_concurrent_part_task()*/
125125
SELECT stop_concurrent_part_task(1::regclass);
126126

127+
/* check function drop_range_partition_expand_next()*/
128+
SELECT drop_range_partition_expand_next('pg_class');
129+
SELECT drop_range_partition_expand_next(NULL) ISNULL;
130+
127131
/* check invoke_on_partition_created_callback() for RANGE*/
128132
SELECT invoke_on_partition_created_callback('calamity.part_test','calamity.part_test',1,NULL,NULL::int);
129133
SELECT invoke_on_partition_created_callback('calamity.part_test','calamity.part_test',1,1,NULL);

‎src/pl_range_funcs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -934,12 +934,12 @@ drop_table_by_oid(Oid relid)
934934
DropStmt*n=makeNode(DropStmt);
935935
constchar*relname=get_qualified_rel_name(relid);
936936

937-
n->removeType=OBJECT_TABLE;
938-
n->missing_ok= false;
939-
n->objects=list_make1(stringToQualifiedNameList(relname));
940-
n->arguments=NIL;
941-
n->behavior=DROP_RESTRICT;/* default behavior */
942-
n->concurrent= false;
937+
n->removeType=OBJECT_TABLE;
938+
n->missing_ok= false;
939+
n->objects=list_make1(stringToQualifiedNameList(relname));
940+
n->arguments=NIL;
941+
n->behavior=DROP_RESTRICT;/* default behavior */
942+
n->concurrent= false;
943943

944944
RemoveRelations(n);
945945
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp