5cff0c8a2d
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>
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 196943ff91a6a21c575fbca1f047544970ec4c98 Mon Sep 17 00:00:00 2001
|
|
From: Sven Klemm <sven@timescale.com>
|
|
Date: Thu, 24 Sep 2020 16:18:43 +0200
|
|
Subject: [PATCH] Adjust copy code to PG13 addRTEtoQuery changes
|
|
|
|
PG13 removes addRTEtoQuery and provides a similar function
|
|
addNSItemToQuery which has a different signature.
|
|
|
|
https://github.com/postgres/postgres/commit/5815696bc6
|
|
|
|
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
|
|
Fetch from: https://github.com/timescale/timescaledb/commit/10d1c2d698c1b7cbf5af86082287adda4f0c6e97.patch
|
|
---
|
|
src/copy.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/copy.c b/src/copy.c
|
|
index 2e63dc76..c8ce93e6 100644
|
|
--- a/src/copy.c
|
|
+++ b/src/copy.c
|
|
@@ -535,7 +535,12 @@ copy_constraints_and_check(ParseState *pstate, Relation rel, List *attnums)
|
|
{
|
|
ListCell *cur;
|
|
char *xactReadOnly;
|
|
-#if PG12_GE
|
|
+#if PG13_GE
|
|
+ ParseNamespaceItem *nsitem =
|
|
+ addRangeTableEntryForRelation(pstate, rel, RowExclusiveLock, NULL, false, false);
|
|
+ RangeTblEntry *rte = nsitem->p_rte;
|
|
+ addNSItemToQuery(pstate, nsitem, true, true, true);
|
|
+#elif PG12
|
|
RangeTblEntry *rte =
|
|
addRangeTableEntryForRelation(pstate, rel, RowExclusiveLock, NULL, false, false);
|
|
addRTEtoQuery(pstate, rte, false, true, true);
|
|
--
|
|
2.29.2
|
|
|