35 lines
1.1 KiB
Diff
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
|
||
|
|