1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-07 11:49:40 +00:00

databases/tsearch_extras: update to 0.3

- add upstream patch to fix build with PostgreSQL 10.x
This commit is contained in:
Ruslan Makhmatkhanov 2018-05-02 10:50:20 +00:00
parent 6782202db5
commit f1200539c6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=468823
3 changed files with 28 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= tsearch_extras
PORTVERSION= 0.2
PORTVERSION= 0.3
CATEGORIES= databases
MAINTAINER= rm@FreeBSD.org

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1469800079
SHA256 (zulip-tsearch_extras-0.2_GH0.tar.gz) = cb52159a609627c032183cdb2adff0e5fe90476c1d5c614d3d51a556562a8ec6
SIZE (zulip-tsearch_extras-0.2_GH0.tar.gz) = 4428
TIMESTAMP = 1525257515
SHA256 (zulip-tsearch_extras-0.3_GH0.tar.gz) = 5bf3bd1a3b6b8dbee636e69177ca980315f6d5bce69d3c10020e65daedb6d2e3
SIZE (zulip-tsearch_extras-0.3_GH0.tar.gz) = 4666

View File

@ -0,0 +1,24 @@
Upstream patch for building with PostgreSQL 10.x
https://github.com/zulip/tsearch_extras/issues/3
diff --git a/tsearch_extras.c b/tsearch_extras.c
index 062dcdb..7464c71 100644
--- tsearch_extras.c
+++ tsearch_extras.c
@@ -77,9 +77,15 @@ ts_match_locs_setup(Oid cfgId, TsMatchesData *mdata, text* in, TSQuery query)
hlparsetext(cfgId, &prs, query, VARDATA(in), VARSIZE(in) - VARHDRSZ);
+ #if PG_VERSION_NUM >= 100000
+ headline_options = lappend(headline_options,
+ makeDefElem(pstrdup("HighlightAll"),
+ (Node *) makeString(pstrdup("1")), -1));
+ #else
headline_options = lappend(headline_options,
makeDefElem(pstrdup("HighlightAll"),
(Node *) makeString(pstrdup("1"))));
+ #endif
FunctionCall3(&(prsobj->prsheadline),
PointerGetDatum(&prs),