Re: Tsvector editing functions

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tsvector editing functions
Date: 2016-02-02 17:10:54
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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

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

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

doesn't check or pay attention to NULL elements in input arrays

Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2016-02-02 17:17:00 Re: Tsvector editing functions
Previous Message Alvaro Herrera 2016-02-02 17:06:50 Re: Relation extension scalability