Re: [PATCH] Combine same ternary types in GIN and TSearch

From: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Combine same ternary types in GIN and TSearch
Date: 2020-11-13 11:47:59
Message-ID: CALT9ZEH9wxsi6b857jbSC1BrwifCycJzEOwr8F4AQ9TjBSy9+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> GIN is not just for full-text search, so using TSTernaryValue in
> GinScanKeyData is wrong. And it would break existing extensions.
>
> I didn't look much further than that, but I've got a feeling that
> combining those is a bad idea. TSTernaryValue is used in text-search
> code, even when there is no GIN involved. It's a separate concept, even
> though it happens to have the same values.

Probably you are right. But now the code already rely on equivalent value
assignments for GinTernaryValue and TSTernaryValue
(in checkcondition_gin()). So my idea was to combine them and use them like
we use other global data types. We may declare it somewhere outside both
gin and search. Or just leave as it is.

Thank you, Heikki for your feedback!

--
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com <http://www.postgrespro.com>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2020-11-13 11:49:36 Re: MultiXact\SLRU buffers configuration
Previous Message Daniel Gustafsson 2020-11-13 11:43:41 Misc typos