typcategory for regconfig

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: "PostgreSQL-dev(dot)" <pgsql-hackers(at)postgresql(dot)org>
Subject: typcategory for regconfig
Date: 2018-04-05 12:54:04
Message-ID: CA+q6zcVJ+Wx+-=kkN5UC0T-LtsJWnx0g9S0xSnn3jUWkriufDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-04-05 12:54:41 Re: [HACKERS] Runtime Partition Pruning
Previous Message Matheus de Oliveira 2018-04-05 12:47:48 Re: [PATCH] btree_gin, add support for uuid, bool, name, bpchar and anyrange types