Skip to content

Commit

Permalink
Merge pull request #17 from tvesely/update_interfaces_to_13_dev
Browse files Browse the repository at this point in the history
Fix incompatibility with Postgres 13 devel
  • Loading branch information
knizhnik committed Aug 17, 2019
2 parents f52add9 + 37472ee commit 0b486f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions deparse.c
Expand Up @@ -1777,7 +1777,11 @@ deparseArrayRef(ArrayRef *node, deparse_expr_cxt *context)
{
deparseExpr(lfirst(lowlist_item), context);
appendStringInfoChar(buf, ':');
#if PG_VERSION_NUM>=130000
lowlist_item = lnext(node->reflowerindexpr, lowlist_item);
#else
lowlist_item = lnext(lowlist_item);
#endif
}
deparseExpr(lfirst(uplist_item), context);
appendStringInfoChar(buf, ']');
Expand Down Expand Up @@ -1840,7 +1844,11 @@ deparseFuncExpr(FuncExpr *node, deparse_expr_cxt *context)
{
if (!first)
appendStringInfoString(buf, ", ");
#if PG_VERSION_NUM>=130000
if (use_variadic && lnext(node->args, arg) == NULL)
#else
if (use_variadic && lnext(arg) == NULL)
#endif
appendStringInfoString(buf, "VARIADIC ");
deparseExpr((Expr *) lfirst(arg), context);
first = false;
Expand Down Expand Up @@ -2168,7 +2176,11 @@ deparseAggref(Aggref *node, deparse_expr_cxt *context)
first = false;

/* Add VARIADIC */
#if PG_VERSION_NUM>=130000
if (use_variadic && lnext(node->args, arg) == NULL)
#else
if (use_variadic && lnext(arg) == NULL)
#endif
appendStringInfoString(buf, "VARIADIC ");

deparseExpr((Expr *) n, context);
Expand Down
2 changes: 1 addition & 1 deletion vops.c
Expand Up @@ -1185,7 +1185,7 @@ static void insert_tuple(Datum* values, bool* nulls)
HeapTuple tup = heap_form_tuple(RelationGetDescr(rel), values, nulls);
#if PG_VERSION_NUM>=120000
ExecStoreHeapTuple(tup, slot, true);
simple_table_insert(rel, slot);
simple_table_tuple_insert(rel, slot);
#else
ExecStoreTuple(tup, slot, InvalidBuffer, true);
simple_heap_insert(rel, slot->tts_tuple);
Expand Down

0 comments on commit 0b486f5

Please sign in to comment.