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

Commit43fd918

Browse files
committed
Heal segfault in handle_modification_query.
To encounter this, you need to parse utility query after entering planning.
1 parentb530684 commit43fd918

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎src/pg_pathman.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,7 @@ make_inh_translation_list(Relation oldrelation, Relation newrelation,
19651965
/*
19661966
* set_append_rel_pathlist
19671967
* Build access paths for an "append relation"
1968+
* Similar to PG function with the same name.
19681969
*
19691970
* NOTE: this function is 'public' (used in hooks.c)
19701971
*/

‎src/planner_tree_modification.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ handle_modification_query(Query *parse, transform_query_cxt *context)
516516
{
517517
RangeTblEntry*rte;
518518
Oidchild;
519-
Node*quals=parse->jointree->quals;
519+
Node*quals;
520520
Indexresult_rti=parse->resultRelation;
521521
ParamListInfoparams=context->query_params;
522522

@@ -525,6 +525,8 @@ handle_modification_query(Query *parse, transform_query_cxt *context)
525525
parse->commandType!=CMD_DELETE))
526526
return;
527527

528+
/* can't set earlier because CMD_UTILITY doesn't have jointree */
529+
quals=parse->jointree->quals;
528530
rte=rt_fetch(result_rti,parse->rtable);
529531

530532
/* Exit if it's ONLY table */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp