projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
419e8f5
)
Add check of headline method presence. Per report by Yoshiyuki Asaba <y-asaba@sraoss...
author
Teodor Sigaev
<teodor@sigaev.ru>
Tue, 15 Jan 2008 17:16:01 +0000
(17:16 +0000)
committer
Teodor Sigaev
<teodor@sigaev.ru>
Tue, 15 Jan 2008 17:16:01 +0000
(17:16 +0000)
src/backend/tsearch/wparser.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/tsearch/wparser.c
b/src/backend/tsearch/wparser.c
index f198a57fda040d425f5f6a3ef1779f9b788a6407..a6df6034435e5135a92b347e2e26bfffb4123244 100644
(file)
--- a/
src/backend/tsearch/wparser.c
+++ b/
src/backend/tsearch/wparser.c
@@
-309,6
+309,11
@@
ts_headline_byid_opt(PG_FUNCTION_ARGS)
cfg = lookup_ts_config_cache(PG_GETARG_OID(0));
prsobj = lookup_ts_parser_cache(cfg->prsId);
+ if ( !OidIsValid( prsobj->headlineOid ) )
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("Text parser doesn't support headline creation")));
+
memset(&prs, 0, sizeof(HeadlineParsedText));
prs.lenwords = 32;
prs.words = (HeadlineWordEntry *) palloc(sizeof(HeadlineWordEntry) * prs.lenwords);