Content-Length: 296506 | pFad | http://github.com/postgrespro/postgres/commit/394e9d1cc79a0717e82d2cbc6868561d451a9480

A5 Use phrase search for PgPro 9.5 · postgrespro/postgres@394e9d1 · GitHub
Skip to content

Commit 394e9d1

Browse files
author
Artur Zakirov
committed
Use phrase search for PgPro 9.5
1 parent 2408962 commit 394e9d1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tsparser.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,8 +2041,14 @@ typedef struct
20412041
int len;
20422042
} hlCheck;
20432043

2044+
#if PG_VERSION_NUM >= 90600 || defined (PGPRO_VERSION)
2045+
#define USE_PHRASE_SEARCH
2046+
#else
2047+
#undef USE_PHRASE_SEARCH
2048+
#endif
2049+
20442050
static bool
2045-
#if PG_VERSION_NUM >= 90600
2051+
#ifdef USE_PHRASE_SEARCH
20462052
checkcondition_HL(void *opaque, QueryOperand *val, ExecPhraseData *data)
20472053
#else
20482054
checkcondition_HL(void *opaque, QueryOperand *val)
@@ -2054,7 +2060,7 @@ checkcondition_HL(void *opaque, QueryOperand *val)
20542060
for (i = 0; i < checkval->len; i++)
20552061
{
20562062
if (checkval->words[i].item == val)
2057-
#if PG_VERSION_NUM >= 90600
2063+
#ifdef USE_PHRASE_SEARCH
20582064
{
20592065
/* don't need to find all positions */
20602066
if (!data)
@@ -2078,7 +2084,7 @@ checkcondition_HL(void *opaque, QueryOperand *val)
20782084
#endif
20792085
}
20802086

2081-
#if PG_VERSION_NUM >= 90600
2087+
#ifdef USE_PHRASE_SEARCH
20822088
if (data && data->npos > 0)
20832089
return true;
20842090
#endif

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/394e9d1cc79a0717e82d2cbc6868561d451a9480

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy