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

Commit713c5f9

Browse files
committed
Fix compability with pg10 (#123)
1 parenta5e7422 commit713c5f9

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

‎src/include/compat/pg_compat.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@
5959
} while (0)
6060
#endif
6161

62+
/*
63+
* CheckValidResultRel()
64+
*/
65+
#ifPG_VERSION_NUM >=100000
66+
#defineCheckValidResultRelCompat(rri,cmd) \
67+
CheckValidResultRel((rri), (cmd))
68+
#elifPG_VERSION_NUM >=90500
69+
#defineCheckValidResultRelCompat(rri,cmd) \
70+
CheckValidResultRel((rri)->ri_RelationDesc, (cmd))
71+
#endif
6272

6373
/*
6474
* BeginCopyFrom()
@@ -590,7 +600,6 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
590600
#endif
591601

592602

593-
594603
/*
595604
* -------------
596605
* Common code

‎src/partition_filter.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ scan_result_parts_storage(Oid partid, ResultPartsStorage *parts_storage)
268268

269269
/* Open relation and check if it is a valid target */
270270
child_rel=heap_open(partid,NoLock);
271-
CheckValidResultRel(child_rel,parts_storage->command_type);
272271

273272
/* Build Var translation list for 'inserted_cols' */
274273
make_inh_translation_list(parent_rel,child_rel,0,&translated_vars);
@@ -318,6 +317,9 @@ scan_result_parts_storage(Oid partid, ResultPartsStorage *parts_storage)
318317
/* ri_ConstraintExprs will be initialized by ExecRelCheck() */
319318
child_result_rel_info->ri_ConstraintExprs=NULL;
320319

320+
/* Check that this partition is a valid result relation */
321+
CheckValidResultRelCompat(child_result_rel_info,parts_storage->command_type);
322+
321323
/* Fill the ResultRelInfo holder */
322324
rri_holder->partid=partid;
323325
rri_holder->result_rel_info=child_result_rel_info;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp