File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,11 @@ partition_filter_exec(CustomScanState *node)
156
156
157
157
ranges = walk_expr_tree ((Expr * ) & state -> temp_const , & wcxt )-> rangeset ;
158
158
parts = get_partition_oids (ranges , & nparts , state -> prel );
159
- Assert (nparts == 1 ); /* there has to be only 1 partition */
159
+
160
+ if (nparts > 1 )
161
+ elog (ERROR , "PartitionFilter selected more than one partition" );
162
+ else if (nparts == 0 )
163
+ elog (ERROR , "PartitionFilter could not select suitable partition" );
160
164
161
165
estate -> es_result_relation_info = getResultRelInfo (parts [0 ], state );
162
166
192
196
partition_filter_rescan (CustomScanState * node )
193
197
{
194
198
Assert (list_length (node -> custom_ps ) == 1 );
195
-
196
199
ExecReScan ((PlanState * ) linitial (node -> custom_ps ));
197
200
}
198
201
You can’t perform that action at this time.
0 commit comments