Skip to content

Commit 346d4bf

Browse files
committed
[PGPRO-4192]: Port pg_tsparser to 13DEV
Tags: pg_tsparser
1 parent 6081a71 commit 346d4bf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tsparser.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,11 @@ typedef struct
19731973
#undef USE_PHRASE_SEARCH
19741974
#endif
19751975

1976+
#if PG_VERSION_NUM >= 13000
1977+
static TSTernaryValue
1978+
#else
19761979
static bool
1980+
#endif
19771981
#ifdef USE_PHRASE_SEARCH
19781982
checkcondition_HL(void *opaque, QueryOperand *val, ExecPhraseData *data)
19791983
#else
@@ -1990,7 +1994,11 @@ checkcondition_HL(void *opaque, QueryOperand *val)
19901994
{
19911995
/* don't need to find all positions */
19921996
if (!data)
1997+
#if PG_VERSION_NUM >= 13000
1998+
return TS_YES;
1999+
#else
19932000
return true;
2001+
#endif
19942002

19952003
if (!data->pos)
19962004
{
@@ -2005,17 +2013,29 @@ checkcondition_HL(void *opaque, QueryOperand *val)
20052013
data->pos[data->npos++] = checkval->words[i].pos;
20062014
}
20072015
}
2016+
#else
2017+
#if PG_VERSION_NUM >= 13000
2018+
return TS_YES;
20082019
#else
20092020
return true;
2021+
#endif
20102022
#endif
20112023
}
20122024

20132025
#ifdef USE_PHRASE_SEARCH
20142026
if (data && data->npos > 0)
2027+
#if PG_VERSION_NUM >= 13000
2028+
return TS_YES;
2029+
#else
20152030
return true;
20162031
#endif
2032+
#endif
20172033

2034+
#if PG_VERSION_NUM >= 13000
2035+
return TS_NO;
2036+
#else
20182037
return false;
2038+
#endif
20192039
}
20202040

20212041

0 commit comments

Comments
 (0)
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