aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-11-13 13:12:35 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-11-13 13:12:50 -0500
commit6f932cac7a20995e07d8c546143c45793a5072a0 (patch)
tree87234e6498a88b32ad2a9d21bce66ca6b011936c
parentcc302f375aed9c8987df6f6951e6b9da19fd4ada (diff)
downloadpostgresql-6f932cac7a20995e07d8c546143c45793a5072a0.tar.gz
postgresql-6f932cac7a20995e07d8c546143c45793a5072a0.zip
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: <CAF4Au4w6rrH_j1bvVhzpOsRiHCog7sGJ3LSX0tY8ZdwhHT88LQ@mail.gmail.com>
-rw-r--r--doc/src/sgml/textsearch.sgml14
1 files changed, 1 insertions, 13 deletions
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index 5a70d7db802..2da75955d0b 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -1290,19 +1290,7 @@ query.',
<para>
<function>ts_headline</> uses the original document, not a
<type>tsvector</type> summary, so it can be slow and should be used with
- care. A typical mistake is to call <function>ts_headline</function> for
- <emphasis>every</emphasis> matching document when only ten documents are
- to be shown. <acronym>SQL</acronym> subqueries can help; here is an
- example:
-
-<programlisting>
-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;
-</programlisting>
+ care.
</para>
</sect2>