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

From Tom Lane
Subject pgsql: Make array_to_tsvector() sort and de-duplicate the given strings
Date
Msg-id E1bVlQh-00013t-Gj@gemulon.postgresql.org
Whole thread Raw
List 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.fsf@credativ.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(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Change InitToastSnapshot to a macro.
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Change InitToastSnapshot to a macro.