blob: b6a0362f36818a35de32db56ee9b11ee68c7f75e [file] [log] [blame]
From 1c50cdc9a1c06c58f9fa72ab963d595c9a99d3d8 Mon Sep 17 00:00:00 2001
From: Sven Klemm <sven@timescale.com>
Date: Thu, 24 Sep 2020 05:33:38 +0200
Subject: [PATCH] Adjust code to PG13 convert_tuples_by_name signature
change
PG13 removed the msg parameter from convert_tuples_by_name.
https://github.com/postgres/postgres/commit/fe66125974
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Fetch from: https://github.com/timescale/timescaledb/commit/968de59f8cd981ba0ca9cca1929d4ba17fbc256f.patch
---
src/chunk_insert_state.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/chunk_insert_state.c b/src/chunk_insert_state.c
index 398a8811..5dc294df 100644
--- a/src/chunk_insert_state.c
+++ b/src/chunk_insert_state.c
@@ -379,8 +379,11 @@ setup_on_conflict_state(ChunkInsertState *state, ChunkDispatch *dispatch, AttrNu
if (NULL == chunk_attnos)
chunk_attnos = convert_tuples_by_name_map(RelationGetDescr(chunk_rel),
- RelationGetDescr(first_rel),
- gettext_noop("could not convert row type"));
+ RelationGetDescr(first_rel)
+#if PG13_LT
+ , gettext_noop("could not convert row type")
+#endif
+ );
onconflset = translate_clause(ts_chunk_dispatch_get_on_conflict_set(dispatch),
chunk_attnos,
@@ -484,8 +487,11 @@ adjust_projections(ChunkInsertState *cis, ChunkDispatch *dispatch, Oid rowtype)
* to work correctly in mapping hypertable attnos->chunk attnos.
*/
chunk_attnos = convert_tuples_by_name_map(RelationGetDescr(chunk_rel),
- RelationGetDescr(hyper_rel),
- gettext_noop("could not convert row type"));
+ RelationGetDescr(hyper_rel)
+#if PG13_LT
+ ,gettext_noop("could not convert row type")
+#endif
+ );
chunk_rri->ri_projectReturning =
get_adjusted_projection_info_returning(chunk_rri->ri_projectReturning,
@@ -590,8 +596,11 @@ ts_chunk_insert_state_create(Chunk *chunk, ChunkDispatch *dispatch)
if (chunk->relkind != RELKIND_FOREIGN_TABLE)
state->hyper_to_chunk_map =
convert_tuples_by_name(RelationGetDescr(parent_rel),
- RelationGetDescr(rel),
- gettext_noop("could not convert row type"));
+ RelationGetDescr(rel)
+#if PG13_LT
+ ,gettext_noop("could not convert row type")
+#endif
+ );
adjust_projections(state, dispatch, RelationGetForm(rel)->reltype);
--
2.29.2