Re: [HACKERS] Tsvector editing functions

2016-03-11 Thread Teodor Sigaev
I saw errors on windows, here is the fix: Thank you, pushed -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Tsvector editing functions

2016-03-11 Thread Stas Kelvich
> > On 11 Mar 2016, at 16:13, Stas Kelvich wrote: > > >> On 10 Mar 2016, at 20:29, Teodor Sigaev wrote: >> >> I would like to suggest rename both functions to array_to_tsvector and >> tsvector_to_array to have consistent name. Later we could add

Re: [HACKERS] Tsvector editing functions

2016-03-11 Thread Stas Kelvich
> On 10 Mar 2016, at 20:29, Teodor Sigaev wrote: > > I would like to suggest rename both functions to array_to_tsvector and > tsvector_to_array to have consistent name. Later we could add > to_tsvector([regconfig, ], text[]) with morphological processing. > > Thoughts? >

Re: [HACKERS] Tsvector editing functions

2016-03-10 Thread Teodor Sigaev
Thanks! Fixed and added tests. Thank you! I did some patch cleanup/fix, but I have some doubt with function's names: 1 to_tsvector: # \df to_tsvector List of functions Schema |Name | Result data type | Argument data types | Type

Re: [HACKERS] Tsvector editing functions

2016-02-17 Thread Stas Kelvich
> > On 02 Feb 2016, at 20:10, Teodor Sigaev 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

Re: [HACKERS] Tsvector editing functions

2016-02-02 Thread Teodor Sigaev
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

Re: [HACKERS] Tsvector editing functions

2016-02-02 Thread Teodor Sigaev
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 Ooops, forgot to attach -- Teodor Sigaev E-mail: teo...@sigaev.ru

Re: [HACKERS] Tsvector editing functions

2016-01-27 Thread Stas Kelvich
Hi > On 22 Jan 2016, at 19:03, Tomas Vondra wrote: > OK, although I do recommend using more sensible variable names, i.e. why how > to use 'lexemes' instead of 'lexarr' for example? Similarly for the other > functions. Changed. With old names I tried to follow

Re: [HACKERS] Tsvector editing functions

2016-01-22 Thread Tomas Vondra
On 12/30/2015 06:49 PM, Stas Kelvich wrote: Hi, Tomáš! Thanks for comprehensive review. On 15 Dec 2015, at 06:07, Tomas Vondra wrote: 1) It's a bit difficult to judge the usefulness of the API, as I've always been a mere user of full-text search, and I

Re: [HACKERS] Tsvector editing functions

2016-01-18 Thread Alvaro Herrera
So, Tomas, Teodor, did you like this new version of the patch? Stas Kelvich wrote: > > 7) Some of the functions use intexterm that does not match the function > > name. I see two such cases - to_tsvector and setweight. Is there a > > reason for that? > > Because sgml compiler wants unique

Re: [HACKERS] Tsvector editing functions

2015-12-30 Thread Stas Kelvich
Hi, Tomáš! Thanks for comprehensive review. > On 15 Dec 2015, at 06:07, Tomas Vondra wrote: > > 1) It's a bit difficult to judge the usefulness of the API, as I've > always been a mere user of full-text search, and I never had a need > (or courage) to mess with

Re: [HACKERS] Tsvector editing functions

2015-12-23 Thread Michael Paquier
On Tue, Dec 15, 2015 at 12:07 PM, Tomas Vondra wrote: > Hi, > > On 12/07/2015 03:05 PM, Stas Kelvich wrote: >> >> Hello. >> >> Done with the list of suggestions. Also heavily edit delete function. >> > > I did a quick review of the updated patch. I'm not a

Re: [HACKERS] Tsvector editing functions

2015-12-14 Thread Tomas Vondra
Hi, On 12/07/2015 03:05 PM, Stas Kelvich wrote: Hello. Done with the list of suggestions. Also heavily edit delete function. I did a quick review of the updated patch. I'm not a tsvector-expert so hopefully my comments won't be entirely bogus. 1) It's a bit difficult to judge the

Re: [HACKERS] Tsvector editing functions

2015-12-07 Thread Stas Kelvich
Hello. Done with the list of suggestions. Also heavily edit delete function. tsvector_ops.diff Description: Binary data --- Stas Kelvich Postgres Professional: http://www.postgrespro.com Russian Postgres Company > On 27 Nov 2015, at 15:13, Teodor Sigaev wrote: > > Hmm,

Re: [HACKERS] Tsvector editing functions

2015-11-27 Thread Teodor Sigaev
1 Please, make patch compilable with current master. cd ../../../src/include/catalog && '/usr/local/bin/perl' ./duplicate_oids 3315 3316 2 lexin = TextDatumGetCString(PG_GETARG_DATUM(1)) lexin_len = strlen(lexin) Why do you use C-string instead of just text? Suppose, much better: t =

Re: [HACKERS] Tsvector editing functions

2015-11-27 Thread Teodor Sigaev
Hmm, seems, it will be useful to add two fuctions: tsvector filter(tsvector, array_of_weigths) - returns tsvector contains lexemes with given weights tsvector setweight(tsvector, weigth, array_of_lexemes) - sets given weight for given lexemes Stas Kelvich wrote: Hello. There is patch

Re: [HACKERS] Tsvector editing functions

2015-10-08 Thread Teodor Sigaev
There is patch that adds some editing routines for tsvector type. ... When submitting a patch, it's a good idea to explain why someone would want the feature you are adding. Maybe that's obvious to you, but it isn't clear to me why we'd want this. Some examples: tsvector delete(tsvector,

Re: [HACKERS] Tsvector editing functions

2015-10-06 Thread Robert Haas
On Mon, Oct 5, 2015 at 1:29 PM, Stas Kelvich wrote: > Hello. > > There is patch that adds some editing routines for tsvector type. > > tsvector delete(tsvector, text) > removes entry from tsvector by lexeme name > set unnest(tsvector) > expands a tsvector

[HACKERS] Tsvector editing functions

2015-10-05 Thread Stas Kelvich
Hello. There is patch that adds some editing routines for tsvector type. tsvector delete(tsvector, text) removes entry from tsvector by lexeme name set unnest(tsvector) expands a tsvector to a set of rows. Each row has following columns: lexeme, postings, weights. text[]