Skip to content

Commit 13fa2b4

Browse files
author
sanchayanghosh
committed
Modifies fix for #2164 : Removes the macro but this fix will only provide compatbility going forward from postgreSQL 18 onwards.
1 parent a66436a commit 13fa2b4

3 files changed

Lines changed: 2 additions & 16 deletions

File tree

src/backend/executor/cypher_delete.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@ const CustomExecMethods cypher_delete_exec_methods = {DELETE_SCAN_STATE_NAME,
5757
NULL,
5858
NULL};
5959

60-
#if PG_VERSION_NUM >= 18000
6160
#define TUPLE_DESC_ATTR_TYPE_ID TupleDescAttr(tupleDescriptor, entity_position - 1)->atttypid
62-
#else
63-
#define TUPLE_DESC_ATTR_TYPE_ID tupleDescriptor->attrs[entity_position - 1]->atttypid
64-
#endif
61+
6562
/*
6663
* Initialization at the beginning of execution. Setup the child node,
6764
* setup its scan tuple slot and projection info, expression context,

src/backend/executor/cypher_set.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,9 @@ const CustomExecMethods cypher_set_exec_methods = {SET_SCAN_STATE_NAME,
5151
NULL,
5252
NULL};
5353

54-
#if PG_VERSION_NUM >= 18000
5554
#define TUPLE_DESC_ATTR_TYPE_ID TupleDescAttr(scanTupleSlot->tts_tupleDescriptor, i)->atttypid
5655
#define TUPLE_DESC_ATTR_TYPE_ID_ENTITY TupleDescAttr(scanTupleSlot->tts_tupleDescriptor, update_item->entity_position - 1)->atttypid
57-
#else
58-
#define TUPLE_DESC_ATTR_TYPE_ID scanTupleSlot->tts_tupleDescriptor->attrs[i]->atttypid
59-
#define TUPLE_DESC_ATTR_TYPE_ID_ENTITY scanTupleSlot->tts_tupleDescriptor->attrs[update_item->entity_position - 1]->atttypid
60-
#endif
56+
6157
static void begin_cypher_set(CustomScanState *node, EState *estate,
6258
int eflags)
6359
{

src/backend/parser/cypher_clause.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,17 +2557,10 @@ static void get_res_cols(ParseState *pstate, ParseNamespaceItem *l_pnsi,
25572557
List *colnames = NIL;
25582558
List *colvars = NIL;
25592559

2560-
#if PG_VERSION_NUM >= 180000
25612560
expandRTE(l_pnsi->p_rte, l_pnsi->p_rtindex, 0, VAR_RETURNING_DEFAULT, -1, false,
25622561
&l_colnames, &l_colvars);
25632562
expandRTE(r_pnsi->p_rte, r_pnsi->p_rtindex, 0, VAR_RETURNING_DEFAULT, -1, false,
25642563
&r_colnames, &r_colvars);
2565-
#else
2566-
expandRTE(l_pnsi->p_rte, l_pnsi->p_rtindex, 0, -1, false,
2567-
&l_colnames, &l_colvars);
2568-
expandRTE(r_pnsi->p_rte, r_pnsi->p_rtindex, 0, -1, false,
2569-
&r_colnames, &r_colvars);
2570-
#endif
25712564

25722565
/* add in all colnames and colvars from the l_rte. */
25732566
*res_colnames = list_concat(*res_colnames, l_colnames);

0 commit comments

Comments
 (0)