File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 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 );
You can’t perform that action at this time.
0 commit comments