Re: json(b)_to_tsvector with numeric values
Teodor Sigaev <teodor@sigaev.ru>
From: Teodor Sigaev <teodor@sigaev.ru>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Arthur Zakirov <a.zakirov@postgrespro.ru>,
Oleg Bartunov <obartunov@postgrespro.ru>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-04-04T14:09:03Z
Lists: pgsql-hackers
>> Hm, seems, it's useful feature, but I suggest to make separate function
>> jsonb_any_to_tsvector and add support for boolean too (if you know better
>> name for function, do not hide it). Changing behavior of existing function
>> is not obvious for users and, seems, should not backpatched.
>
> What do you think about having not a separate function, but a flag argument to
> the existing one (like `create` in `jsonb_set`), that will have false as
> default value? The result would be the same, but without an extra function with
> almost the same implementation.
tsvector jsonb_to_tsvector(jsonb[, bool]) ?
Agreed. Second arg should be optional.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
Commits
-
Add json(b)_to_tsvector function
- 1c1791e00065 11.0 landed