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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make array_to_tsvector() sort and de-duplicate the given strings
Date: 2016-08-05 20:09:15
Message-ID: E1bVlQh-00013t-Gj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)fsf(at)credativ(dot)de>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f10eab73df2b94c860dea4a906c54e3c903f42e2

Modified Files
--------------
doc/src/sgml/func.sgml | 2 +-
src/backend/utils/adt/tsvector_op.c | 49 ++++++++++++++++++++++++++++++-----
src/test/regress/expected/tstypes.out | 7 +++++
src/test/regress/sql/tstypes.sql | 2 ++
4 files changed, 52 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-08-05 20:19:25 Re: pgsql: Change InitToastSnapshot to a macro.
Previous Message Andrew Dunstan 2016-08-05 19:19:59 Re: pgsql: Change InitToastSnapshot to a macro.