Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf7807f1

Browse files
committed
Add check of headline method presence. Per report by Yoshiyuki Asaba <y-asaba@sraoss.co.jp>
1 parentdbdc2e5 commitf7807f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/backend/tsearch/wparser.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/wparser.c,v 1.6 2008/01/01 19:45:52 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/wparser.c,v 1.7 2008/01/15 17:16:01 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -309,6 +309,11 @@ ts_headline_byid_opt(PG_FUNCTION_ARGS)
309309
cfg=lookup_ts_config_cache(PG_GETARG_OID(0));
310310
prsobj=lookup_ts_parser_cache(cfg->prsId);
311311

312+
if ( !OidIsValid(prsobj->headlineOid ) )
313+
ereport(ERROR,
314+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
315+
errmsg("Text parser doesn't support headline creation")));
316+
312317
memset(&prs,0,sizeof(HeadlineParsedText));
313318
prs.lenwords=32;
314319
prs.words= (HeadlineWordEntry*)palloc(sizeof(HeadlineWordEntry)*prs.lenwords);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp