typcategory for regconfig - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject typcategory for regconfig
Date
Msg-id CA+q6zcVJ+Wx+-=kkN5UC0T-LtsJWnx0g9S0xSnn3jUWkriufDA@mail.gmail.com
Whole thread Raw
Responses Re: typcategory for regconfig  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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,
because Postgres can't distinguish between `to_tsvector(regconfig, text)` and
`to_tsvector(jsonb, boolean)` in the expression:

    to_tsvector('english', 'some text')

If it's value would be `TYPCATEGORY_STRING`, then everything will be fine,
since a string type will win. Also, it doesn't break any existing tests, so I
wonder whether it should be like that or not?

1:
https://www.postgresql.org/message-id/flat/CA%2Bq6zcXJQbS1b4kJ_HeAOoOc%3DunfnOrUEL%3DKGgE32QKDww7d8g%40mail.gmail.com


pgsql-hackers by date:

Previous
From: Matheus de Oliveira
Date:
Subject: Re: [PATCH] btree_gin, add support for uuid, bool, name, bpchar andanyrange types
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] Runtime Partition Pruning