1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Make array_to_tsvector() sort and de-duplicate the given strings.

This is required for the result to be a legal tsvector value.
Noted while fooling with Andreas Seltenreich's ts_delete() crash.

Discussion: <87invhoj6e.fsf@credativ.de>
This commit is contained in:
Tom Lane
2016-08-05 16:09:06 -04:00
parent c50d192ce3
commit f10eab73df
4 changed files with 53 additions and 9 deletions

View File

@ -9294,7 +9294,7 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
<entry><type>tsvector</type></entry>
<entry>convert array of lexemes to <type>tsvector</type></entry>
<entry><literal>array_to_tsvector('{fat,cat,rat}'::text[])</literal></entry>
<entry><literal>'fat' 'cat' 'rat'</literal></entry>
<entry><literal>'cat' 'fat' 'rat'</literal></entry>
</row>
<row>
<entry>