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

Commit58cb505

Browse files
committed
Port to PG 11
1 parent62cd735 commit58cb505

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

‎deparse.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,19 @@ foreign_expr_walker(Node *node,
389389
char*
390390
deparse_type_name(Oidtype_oid,int32typemod)
391391
{
392+
#ifPG_VERSION_NUM>=110000
393+
uint8flags=FORMAT_TYPE_TYPEMOD_GIVEN;
394+
395+
if (type_oid >=FirstBootstrapObjectId)
396+
flags |=FORMAT_TYPE_FORCE_QUALIFY;
397+
398+
returnformat_type_extended(type_oid,typemod,flags);
399+
#else
392400
if (type_oid<FirstBootstrapObjectId)
393401
returnformat_type_with_typemod(type_oid,typemod);
394402
else
395403
returnformat_type_with_typemod_qualified(type_oid,typemod);
404+
#endif
396405
}
397406

398407
/*
@@ -1365,8 +1374,11 @@ deparseColumnRef(StringInfo buf, int varno, int varattno, PlannerInfo *root,
13651374
* FDW option, use attribute name.
13661375
*/
13671376
if (colname==NULL)
1377+
#ifPG_VERSION_NUM>=110000
1378+
colname=get_attname(rte->relid,varattno, false);
1379+
#else
13681380
colname=get_relid_attribute_name(rte->relid,varattno);
1369-
1381+
#endif
13701382
if (qualify_col)
13711383
ADD_REL_QUALIFIER(buf,varno);
13721384

‎vops.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,10 +1039,13 @@ static void begin_batch_insert(Oid oid)
10391039
estate->es_result_relations=resultRelInfo;
10401040
estate->es_num_result_relations=1;
10411041
estate->es_result_relation_info=resultRelInfo;
1042-
10431042
ExecOpenIndices(estate->es_result_relation_info, false);
1043+
#ifPG_VERSION_NUM>=110000
1044+
slot=ExecInitExtraTupleSlot(estate,RelationGetDescr(rel));
1045+
#else
10441046
slot=ExecInitExtraTupleSlot(estate);
10451047
ExecSetSlotDescriptor(slot,RelationGetDescr(rel));
1048+
#endif
10461049
}
10471050

10481051
staticvoidinsert_tuple(Datum*values,bool*nulls)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp