Skip to content

Commit edf322e

Browse files
committed
Support 13 psql. Added returning type TSTernaryValue for checkcondition_HL() function.
1 parent ab2e893 commit edf322e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Diff for: tsparser.c

+20
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 >= 130000
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 >= 130000
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 >= 130000
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 >= 130000
2028+
return TS_YES;
2029+
#else
20152030
return true;
20162031
#endif
2032+
#endif
20172033

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

20212041

0 commit comments

Comments
 (0)