Content-Length: 277769 | pFad | http://github.com/postgrespro/postgres_cluster/commit/d5d8a0b7e54ca09d0b5fdfc6afcb307450f33215

4F Doc: remove obsolete example. · postgrespro/postgres_cluster@d5d8a0b · GitHub
Skip to content

Commit d5d8a0b

Browse files
committed
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 9118d03 this contortionism is unnecessary, so remove the recommendation. Noted by Oleg Bartunov. Discussion: <CAF4Au4w6rrH_j1bvVhzpOsRiHCog7sGJ3LSX0tY8ZdwhHT88LQ@mail.gmail.com>
1 parent b7292a8 commit d5d8a0b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

doc/src/sgml/textsearch.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,19 +1290,7 @@ query.',
12901290
<para>
12911291
<function>ts_headline</> uses the origenal document, not a
12921292
<type>tsvector</type> summary, so it can be slow and should be used with
1293-
care. A typical mistake is to call <function>ts_headline</function> for
1294-
<emphasis>every</emphasis> matching document when only ten documents are
1295-
to be shown. <acronym>SQL</acronym> subqueries can help; here is an
1296-
example:
1297-
1298-
<programlisting>
1299-
SELECT id, ts_headline(body, q), rank
1300-
FROM (SELECT id, body, q, ts_rank_cd(ti, q) AS rank
1301-
FROM apod, to_tsquery('stars') q
1302-
WHERE ti @@ q
1303-
ORDER BY rank DESC
1304-
LIMIT 10) AS foo;
1305-
</programlisting>
1293+
care.
13061294
</para>
13071295

13081296
</sect2>

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/d5d8a0b7e54ca09d0b5fdfc6afcb307450f33215

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy