Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4sxX-0001v1-G4 for pgsql-committers@arkaria.postgresql.org; Sat, 07 Apr 2018 18:53:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f4sxW-0001x7-4D for pgsql-committers@arkaria.postgresql.org; Sat, 07 Apr 2018 18:53:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4sxV-0001wy-VG for pgsql-committers@lists.postgresql.org; Sat, 07 Apr 2018 18:53:06 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f4sxS-0005I4-SO for pgsql-committers@lists.postgresql.org; Sat, 07 Apr 2018 18:53:05 +0000 Received: from zorg.sigaev.ru (95-25-2-27.broadband.corbina.ru [95.25.2.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id D6EE9B191A0 for ; Sat, 7 Apr 2018 21:53:01 +0300 (MSK) Subject: Re: pgsql: Add json(b)_to_tsvector function From: Teodor Sigaev To: pgsql-committers@lists.postgresql.org References: Message-ID: <6aed7303-8bfd-b1a5-1ae9-50e78749178a@sigaev.ru> Date: Sat, 7 Apr 2018 21:53:01 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=desmoxytes&dt=2018-04-07 18%3A32%3A02 test select_parallel ... FAILED I don't understand how it's connected to json_to_tsquery. Can somebody point me what I'm missing? Teodor Sigaev wrote: > Add json(b)_to_tsvector function > > Jsonb has a complex nature so there isn't best-for-everything way to convert it > to tsvector for full text search. Current to_tsvector(json(b)) suggests to > convert only string values, but it's possible to index keys, numerics and even > booleans value. To solve that json(b)_to_tsvector has a second required > argument contained a list of desired types of json fields. Second argument is > a jsonb scalar or array right now with possibility to add new options in a > future. > > Bump catalog version > > Author: Dmitry Dolgov with some editorization by me > Reviewed by: Teodor Sigaev > Discussion: https://www.postgresql.org/message-id/CA+q6zcXJQbS1b4kJ_HeAOoOc=unfnOrUEL=KGgE32QKDww7d8g@mail.gmail.com > > Branch > ------ > master > > Details > ------- > https://git.postgresql.org/pg/commitdiff/1c1791e00065f6986f9d44a78ce7c28b2d1322dd > > Modified Files > -------------- > doc/src/sgml/func.sgml | 20 ++++ > src/backend/tsearch/to_tsany.c | 128 ++++++++++++++++++++++---- > src/backend/utils/adt/jsonfuncs.c | 179 ++++++++++++++++++++++++++++++++---- > src/include/catalog/catversion.h | 2 +- > src/include/catalog/pg_proc.h | 24 +++-- > src/include/utils/jsonapi.h | 21 ++++- > src/test/regress/expected/json.out | 122 ++++++++++++++++++++++++ > src/test/regress/expected/jsonb.out | 122 ++++++++++++++++++++++++ > src/test/regress/sql/json.sql | 30 ++++++ > src/test/regress/sql/jsonb.sql | 30 ++++++ > 10 files changed, 629 insertions(+), 49 deletions(-) > -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/