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

Commit4666195

Browse files
committed
Fix compilation for v10 and fix dropped_cols test, there is still segfault on update nodes
1 parent8918bd3 commit4666195

File tree

4 files changed

+27
-18
lines changed

4 files changed

+27
-18
lines changed

‎expected/pathman_dropped_cols.out

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ BEGIN
103103
LOOP
104104
FOR d IN 1..2 LOOP
105105
INSERT INTO root_dict (root_id, start_date, num, main, dict_code, dict_name, edit_num, edit_date, sign) VALUES
106-
(r.r,now(), 'num_' || d, (d % 2) + 1, 'code_' || d, 'name_' || d, NULL, NULL, '2014');
106+
(r.r,'2010-10-10'::date, 'num_' || d, (d % 2) + 1, 'code_' || d, 'name_' || d, NULL, NULL, '2014');
107107
END LOOP;
108108
END LOOP;
109109
END
@@ -136,51 +136,51 @@ WHERE root_id = $1;
136136
EXECUTE getbyroot(2);
137137
id | root_id | start_date | num | main | edit_num | edit_date | dict_id
138138
----+---------+------------+-------+------+----------+-----------+---------
139-
3 | 2 |09-12-2018 | num_1 | 2 | | | 3
140-
4 | 2 |09-12-2018 | num_2 | 1 | | | 3
139+
3 | 2 |10-10-2010 | num_1 | 2 | | | 3
140+
4 | 2 |10-10-2010 | num_2 | 1 | | | 3
141141
(2 rows)
142142

143143
EXECUTE getbyroot(2);
144144
id | root_id | start_date | num | main | edit_num | edit_date | dict_id
145145
----+---------+------------+-------+------+----------+-----------+---------
146-
3 | 2 |09-12-2018 | num_1 | 2 | | | 3
147-
4 | 2 |09-12-2018 | num_2 | 1 | | | 3
146+
3 | 2 |10-10-2010 | num_1 | 2 | | | 3
147+
4 | 2 |10-10-2010 | num_2 | 1 | | | 3
148148
(2 rows)
149149

150150
EXECUTE getbyroot(2);
151151
id | root_id | start_date | num | main | edit_num | edit_date | dict_id
152152
----+---------+------------+-------+------+----------+-----------+---------
153-
3 | 2 |09-12-2018 | num_1 | 2 | | | 3
154-
4 | 2 |09-12-2018 | num_2 | 1 | | | 3
153+
3 | 2 |10-10-2010 | num_1 | 2 | | | 3
154+
4 | 2 |10-10-2010 | num_2 | 1 | | | 3
155155
(2 rows)
156156

157157
EXECUTE getbyroot(2);
158158
id | root_id | start_date | num | main | edit_num | edit_date | dict_id
159159
----+---------+------------+-------+------+----------+-----------+---------
160-
3 | 2 |09-12-2018 | num_1 | 2 | | | 3
161-
4 | 2 |09-12-2018 | num_2 | 1 | | | 3
160+
3 | 2 |10-10-2010 | num_1 | 2 | | | 3
161+
4 | 2 |10-10-2010 | num_2 | 1 | | | 3
162162
(2 rows)
163163

164164
EXECUTE getbyroot(2);
165165
id | root_id | start_date | num | main | edit_num | edit_date | dict_id
166166
----+---------+------------+-------+------+----------+-----------+---------
167-
3 | 2 |09-12-2018 | num_1 | 2 | | | 3
168-
4 | 2 |09-12-2018 | num_2 | 1 | | | 3
167+
3 | 2 |10-10-2010 | num_1 | 2 | | | 3
168+
4 | 2 |10-10-2010 | num_2 | 1 | | | 3
169169
(2 rows)
170170

171171
-- errors usually start here
172172
EXECUTE getbyroot(2);
173173
id | root_id | start_date | num | main | edit_num | edit_date | dict_id
174174
----+---------+------------+-------+------+----------+-----------+---------
175-
3 | 2 |09-12-2018 | num_1 | 2 | | | 3
176-
4 | 2 |09-12-2018 | num_2 | 1 | | | 3
175+
3 | 2 |10-10-2010 | num_1 | 2 | | | 3
176+
4 | 2 |10-10-2010 | num_2 | 1 | | | 3
177177
(2 rows)
178178

179179
EXECUTE getbyroot(2);
180180
id | root_id | start_date | num | main | edit_num | edit_date | dict_id
181181
----+---------+------------+-------+------+----------+-----------+---------
182-
3 | 2 |09-12-2018 | num_1 | 2 | | | 3
183-
4 | 2 |09-12-2018 | num_2 | 1 | | | 3
182+
3 | 2 |10-10-2010 | num_1 | 2 | | | 3
183+
4 | 2 |10-10-2010 | num_2 | 1 | | | 3
184184
(2 rows)
185185

186186
EXPLAIN EXECUTE getbyroot(2);

‎sql/pathman_dropped_cols.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ BEGIN
6363
LOOP
6464
FOR dIN1..2 LOOP
6565
INSERT INTO root_dict (root_id, start_date, num, main, dict_code, dict_name, edit_num, edit_date, sign)VALUES
66-
(r.r,now(),'num_'|| d, (d %2)+1,'code_'|| d,'name_'|| d,NULL,NULL,'2014');
66+
(r.r,'2010-10-10'::date,'num_'|| d, (d %2)+1,'code_'|| d,'name_'|| d,NULL,NULL,'2014');
6767
END LOOP;
6868
END LOOP;
6969
END

‎src/include/compat/pg_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ ExecCheck(ExprState *state, ExprContext *econtext)
415415
/*
416416
* extract_actual_join_clauses()
417417
*/
418-
#if (PG_VERSION_NUM >=100004)|| \
418+
#if (PG_VERSION_NUM >=100003)|| \
419419
(PG_VERSION_NUM<100000&&PG_VERSION_NUM >=90609)|| \
420420
(PG_VERSION_NUM<90600&&PG_VERSION_NUM >=90513)
421421
#defineextract_actual_join_clauses_compat(restrictinfo_list, \

‎src/partition_router.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,20 @@ prepare_modify_table_for_partition_router(PlanState *state, void *context)
170170

171171
if (!changed_method)
172172
{
173+
/* HACK: replace ModifyTable's execution method */
174+
#ifPG_VERSION_NUM >=110000
173175
if (!mt_method)
174176
mt_method=state->ExecProcNodeReal;
175177

176-
/* HACK: replace ModifyTable's execution method */
177178
ExecSetExecProcNode(state,router_run_modify_table);
179+
#elifPG_VERSION_NUM >=100000
180+
if (!mt_method)
181+
mt_method=state->ExecProcNode;
182+
183+
state->ExecProcNode=router_run_modify_table;
184+
#else
185+
#error "doesn't supported yet"
186+
#endif
178187

179188
changed_method= true;
180189
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp