kumquat-buildroot/package/timescaledb/0013-Adjust-copy-code-to-PG13-changes.patch
Maxim Kochetkov 5cff0c8a2d package/timescaledb: bump to version 2.0.0
Add patches needed for compatibility with Postgresql 13, which are
still under review upstream.

Debug builds (BR2_ENABLE_DEBUG=y) fails because of warnings, so
disable WARNINGS_AS_ERRORS.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-01-21 22:48:16 +01:00

35 lines
1.1 KiB
Diff

From 5cea3a687f7227997deb0eacbb061c586c6713f7 Mon Sep 17 00:00:00 2001
From: Sven Klemm <sven@timescale.com>
Date: Sat, 26 Sep 2020 02:57:38 +0200
Subject: [PATCH] Adjust copy code to PG13 changes
PG13 adds a CmdType argument to ExecComputeStoredGenerated.
https://github.com/postgres/postgres/commit/c6679e4fca
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/a2d15828cbbbe7570afb03bb930df083ddeafd7a.patch
---
src/copy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/copy.c b/src/copy.c
index c8ce93e6..e38ae15e 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -379,7 +379,11 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call
/* Compute stored generated columns */
if (resultRelInfo->ri_RelationDesc->rd_att->constr &&
resultRelInfo->ri_RelationDesc->rd_att->constr->has_generated_stored)
+#if PG13_GE
+ ExecComputeStoredGenerated(estate, myslot, CMD_INSERT);
+#else
ExecComputeStoredGenerated(estate, myslot);
+#endif
#endif
/*
* If the target is a plain table, check the constraints of
--
2.29.2