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

Commit967d13f

Browse files
committed
show error message if ON CONFLICT clause is present, improve comments
1 parent21ea8b5 commit967d13f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎src/partition_filter.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,20 +374,28 @@ make_partition_filter(Plan *subplan, Oid parent_relid,
374374
CustomScan*cscan=makeNode(CustomScan);
375375
Relationparent_rel;
376376

377+
/* Currenly we don't support ON CONFLICT clauses */
378+
if (conflict_action!=ONCONFLICT_NONE)
379+
ereport(ERROR,
380+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
381+
errmsg("ON CONFLICT clause is not supported with partitioned tables")));
382+
383+
/* Copy costs etc */
377384
cscan->scan.plan.startup_cost=subplan->startup_cost;
378385
cscan->scan.plan.total_cost=subplan->total_cost;
379386
cscan->scan.plan.plan_rows=subplan->plan_rows;
380387
cscan->scan.plan.plan_width=subplan->plan_width;
381388

389+
/* Setup methods and child plan */
382390
cscan->methods=&partition_filter_plan_methods;
383391
cscan->custom_plans=list_make1(subplan);
384392

393+
/* Build an appropriate target list using a cached Relation entry */
385394
parent_rel=RelationIdGetRelation(parent_relid);
386-
cscan->scan.plan.targetlist=pfilter_build_tlist(parent_rel,
387-
subplan->targetlist);
395+
cscan->scan.plan.targetlist=pfilter_build_tlist(parent_rel,subplan->targetlist);
388396
RelationClose(parent_rel);
389397

390-
/* No relation will be scanned */
398+
/* Nophysicalrelation will be scanned */
391399
cscan->scan.scanrelid=0;
392400
cscan->custom_scan_tlist=subplan->targetlist;
393401

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp