> > On 02 Feb 2016, at 20:10, Teodor Sigaev <[email protected]> wrote: > > Some notices: > > 1 tsin in documentation doesn't look like a good name. Changed to vector > similar to other places. > > 2 I did some editorization about freeing memory/forgotten names etc
Thanks.
>
> 3 It seems to me that tsvector_unnest() could be seriously optimized for
> large tsvectors: with current coding it detoasts/decompresses tsvector value
> on each call. Much better to do it once in
> multi_call_memory_ctx context at first call init
Done, moved detoasting to first SRF call.
> 4 It seems debatable returning empty array for position/weight if they are
> absent:
> =# select * from unnest('a:1 b'::tsvector);
> lexeme | positions | weights
> --------+-----------+---------
> a | {1} | {D}
> b | {} | {}
> I think, it's better to return NULL in this case
>
Okay, done.
> 5
> array_to_tsvector/tsvector_setweight_by_filter/tsvector_delete_arr/tsvector_filter
> doesn't check or pay attention to NULL elements in input arrays
>
Thanks! Fixed and added tests.
> --
> Teodor Sigaev E-mail: [email protected]
> WWW: http://www.sigaev.ru/
>
>
> --
> Sent via pgsql-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
tsvector_ops-v4.diff
Description: Binary data
--- Stas Kelvich Postgres Professional: http://www.postgrespro.com Russian Postgres Company
-- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
