kumquat-buildroot/package/timescaledb/0010-Adjust-decompress-code-to-Var-field-renames.patch

42 lines
1.4 KiB
Diff
Raw Normal View History

From d0f82f514eb1f59d63fcbfe71ec99d5d8f82649d Mon Sep 17 00:00:00 2001
From: Sven Klemm <sven@timescale.com>
Date: Fri, 25 Sep 2020 14:23:01 +0200
Subject: [PATCH] Adjust decompress code to Var field renames
PG13 renames the varnoold and varoattno field of Var to varnosyn and
varattnosyn.
https://github.com/postgres/postgres/commit/9ce77d75c5
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Fetch from: https://github.com/timescale/timescaledb/pull/2786/commits/d46b5de84b975d6f394a7f1fa94a34c5062f50ca.patch
---
tsl/src/nodes/decompress_chunk/decompress_chunk.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tsl/src/nodes/decompress_chunk/decompress_chunk.c b/tsl/src/nodes/decompress_chunk/decompress_chunk.c
index 1e36f5dc..4a6fa782 100644
--- a/tsl/src/nodes/decompress_chunk/decompress_chunk.c
+++ b/tsl/src/nodes/decompress_chunk/decompress_chunk.c
@@ -739,11 +739,15 @@ create_var_for_compressed_equivalence_member(Var *var, const EMCreationContext *
if (var->varlevelsup == 0)
{
var->varno = context->compressed_relid_idx;
- var->varnoold = context->compressed_relid_idx;
var->varattno =
get_attnum(context->compressed_relid, NameStr(context->current_col_info->attname));
-
+#if PG13_GE
+ var->varnosyn = var->varno;
+ var->varattnosyn = var->varattno;
+#else
+ var->varnoold = var->varno;
var->varoattno = var->varattno;
+#endif
return (Node *) var;
}
--
2.29.2