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

Commit2284abc

Browse files
committed
add more comments for RowMarks fixes etc
1 parent8b3b05c commit2284abc

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

‎src/include/compat/relation_tags.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
*
33
* relation_tags.h
44
*Attach custom (Key, Value) pairs to an arbitrary RangeTblEntry
5-
*NOTE: implementations for vanilla and PostgresPro differ
5+
*
6+
*NOTE: implementations for vanilla and PostgresPro differ,
7+
*which means that subquery pull-up might break the bond
8+
*between a RangeTblEntry and the corresponding KVPs.
9+
*
10+
*This subsystem was meant to replace the broken 'inh' flag
11+
*(see get_rel_parenthood_status() for more details).
612
*
713
* Copyright (c) 2017, Postgres Professional
814
*

‎src/include/compat/rowmarks_fix.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ void append_tle_for_rowmark(PlannerInfo *root, PlanRowMark *rc);
2929

3030
#else
3131

32-
#defineLEGACY_ROWMARKS_95/* NOTE: can't fix 9.5, see PlannerInfo->processed_tlist */
32+
/*
33+
* Starting from 9.6, it's possible to append junk
34+
* tableoid columns using the PlannerInfo->processed_tlist.
35+
* This is absolutely crucial for UPDATE and DELETE queries,
36+
* so we had to add some special fixes for 9.5:
37+
*
38+
*1) provide legacy code for RowMarks (tableoids);
39+
*2) disable dangerous UPDATE & DELETE optimizations.
40+
*/
41+
#defineLEGACY_ROWMARKS_95
3342

3443
#defineappend_tle_for_rowmark(root,rc)( (void) true )
3544

‎src/planner_tree_modification.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@
4444

4545
typedefstruct
4646
{
47-
/*bool has_parent_CMD_TYPE_query; */
47+
/*Do we have a parent CmdType query? */
4848
boolTRANSFORM_CONTEXT_FIELD(SELECT),
4949
TRANSFORM_CONTEXT_FIELD(INSERT),
5050
TRANSFORM_CONTEXT_FIELD(UPDATE),
5151
TRANSFORM_CONTEXT_FIELD(DELETE);
5252

53-
/*params for handle_modification_query() */
53+
/*Parameters for handle_modification_query() */
5454
ParamListInfoquery_params;
55+
56+
/* SubLink that might contain an examined query */
5557
SubLink*parent_sublink;
5658
}transform_query_cxt;
5759

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp