From 6f932cac7a20995e07d8c546143c45793a5072a0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 13 Nov 2016 13:12:35 -0500 Subject: [PATCH] Doc: remove obsolete example. The documentation for ts_headline() recommends using a sub-select to avoid extra evaluations of ts_headline() in a query with ORDER BY+LIMIT. Since commit 9118d03a8 this contortionism is unnecessary, so remove the recommendation. Noted by Oleg Bartunov. Discussion: --- doc/src/sgml/textsearch.sgml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 5a70d7db80..2da75955d0 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -1290,19 +1290,7 @@ query.', ts_headline uses the original document, not a tsvector summary, so it can be slow and should be used with - care. A typical mistake is to call ts_headline for - every matching document when only ten documents are - to be shown. SQL subqueries can help; here is an - example: - - -SELECT id, ts_headline(body, q), rank -FROM (SELECT id, body, q, ts_rank_cd(ti, q) AS rank - FROM apod, to_tsquery('stars') q - WHERE ti @@ q - ORDER BY rank DESC - LIMIT 10) AS foo; - + care. -- 2.40.0