Re: typcategory for regconfig

2018-04-05 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: > On 5 April 2018 at 15:48, Tom Lane wrote: >> Right. So you need to either drop that form, or consider doing >> something other than add-a-bool. Maybe the alternate behavior >> should have a different function name, instead of being selected >> by a

Re: typcategory for regconfig

2018-04-05 Thread Dmitry Dolgov
> On 5 April 2018 at 15:48, Tom Lane wrote: > Dmitry Dolgov <9erthali...@gmail.com> writes: >> On 5 April 2018 at 15:27, Tom Lane wrote: >>> I think you need to bite the bullet and just provide the flag in >>> the 3-argument case (regconfig,json[b],bool). > >> Well, it's already like that. I have

Re: typcategory for regconfig

2018-04-05 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: > On 5 April 2018 at 15:27, Tom Lane wrote: >> I think you need to bite the bullet and just provide the flag in >> the 3-argument case (regconfig,json[b],bool). > Well, it's already like that. I have now: > to_tsvector(json(b), boolean) > to_

Re: typcategory for regconfig

2018-04-05 Thread Dmitry Dolgov
> On 5 April 2018 at 15:27, Tom Lane wrote: > Dmitry Dolgov <9erthali...@gmail.com> writes: >> Does anyone know, why `typcategory` value for tsvector `regconfig` is >> `TYPCATEGORY_NUMERIC`, > > Because OID is. I think we need all the OID-alias types to be the same > category as OID, else we're l

Re: typcategory for regconfig

2018-04-05 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: > Does anyone know, why `typcategory` value for tsvector `regconfig` is > `TYPCATEGORY_NUMERIC`, Because OID is. I think we need all the OID-alias types to be the same category as OID, else we're likely to have issues with queries like ... wh

typcategory for regconfig

2018-04-05 Thread Dmitry Dolgov
Hi, Does anyone know, why `typcategory` value for tsvector `regconfig` is `TYPCATEGORY_NUMERIC`, but in all the tests it's being used in string format? It's probably not a big deal, but in this thread [1] it prevents me from adopting the nice solution with a boolean flag for `to_tsvector` function