From 346d4bf0a43861ff4555497ca4faef04cfe180a0 Mon Sep 17 00:00:00 2001 From: Daria Lepikhova Date: Mon, 28 Sep 2020 15:22:18 +0500 Subject: [PATCH 1/2] [PGPRO-4192]: Port pg_tsparser to 13DEV Tags: pg_tsparser --- tsparser.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tsparser.c b/tsparser.c index 53ff6ac..9b85fe9 100644 --- a/tsparser.c +++ b/tsparser.c @@ -1973,7 +1973,11 @@ typedef struct #undef USE_PHRASE_SEARCH #endif +#if PG_VERSION_NUM >= 13000 +static TSTernaryValue +#else static bool +#endif #ifdef USE_PHRASE_SEARCH checkcondition_HL(void *opaque, QueryOperand *val, ExecPhraseData *data) #else @@ -1990,7 +1994,11 @@ checkcondition_HL(void *opaque, QueryOperand *val) { /* don't need to find all positions */ if (!data) +#if PG_VERSION_NUM >= 13000 + return TS_YES; +#else return true; +#endif if (!data->pos) { @@ -2005,17 +2013,29 @@ checkcondition_HL(void *opaque, QueryOperand *val) data->pos[data->npos++] = checkval->words[i].pos; } } +#else +#if PG_VERSION_NUM >= 13000 + return TS_YES; #else return true; +#endif #endif } #ifdef USE_PHRASE_SEARCH if (data && data->npos > 0) +#if PG_VERSION_NUM >= 13000 + return TS_YES; +#else return true; #endif +#endif +#if PG_VERSION_NUM >= 13000 + return TS_NO; +#else return false; +#endif } From f22a81012309011830b0641e917027cc5bba4797 Mon Sep 17 00:00:00 2001 From: Daria Lepikhova Date: Fri, 2 Oct 2020 14:05:45 +0500 Subject: [PATCH 2/2] Fix version num in ifdef --- tsparser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tsparser.c b/tsparser.c index 9b85fe9..78bf357 100644 --- a/tsparser.c +++ b/tsparser.c @@ -1973,7 +1973,7 @@ typedef struct #undef USE_PHRASE_SEARCH #endif -#if PG_VERSION_NUM >= 13000 +#if PG_VERSION_NUM >= 130000 static TSTernaryValue #else static bool @@ -1994,7 +1994,7 @@ checkcondition_HL(void *opaque, QueryOperand *val) { /* don't need to find all positions */ if (!data) -#if PG_VERSION_NUM >= 13000 +#if PG_VERSION_NUM >= 130000 return TS_YES; #else return true; @@ -2014,7 +2014,7 @@ checkcondition_HL(void *opaque, QueryOperand *val) } } #else -#if PG_VERSION_NUM >= 13000 +#if PG_VERSION_NUM >= 130000 return TS_YES; #else return true; @@ -2024,14 +2024,14 @@ checkcondition_HL(void *opaque, QueryOperand *val) #ifdef USE_PHRASE_SEARCH if (data && data->npos > 0) -#if PG_VERSION_NUM >= 13000 +#if PG_VERSION_NUM >= 130000 return TS_YES; #else return true; #endif #endif -#if PG_VERSION_NUM >= 13000 +#if PG_VERSION_NUM >= 130000 return TS_NO; #else return false; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy