public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Paul Jungwirth <[email protected]>
To: jian he <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: SQL:2011 application time
Date: Thu, 23 Nov 2023 10:08:54 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail.gmail.com>
<[email protected]>
<CACJufxGCWDSK2pYMwNdsyDGk6skbP_L5yvSBK67L6pxbGUF8OQ@mail.gmail.com>
<[email protected]>
<CACJufxG_iZc8hbdcfjkU6q81kLf4R2Fp=VyDZbyhocuTbMNVEw@mail.gmail.com>
<[email protected]>
<CACJufxGnN6-513copYkpgJia6Qq7vKtO6q7cigUpA=4Evozppg@mail.gmail.com>
<CACJufxGsjGXbKT-qbPYtspLxN74B8Q8dBXRZV+HfgqC0hh-ZNQ@mail.gmail.com>
<CACJufxGt4oYfa7UN2eAXymgOKH1irbhC5eY_oNkkdj30w-fefw@mail.gmail.com>
<CACJufxExyO_mN8-OkgaTdgqmE5OfE=RBoQXizf=8uRj4c-pAYw@mail.gmail.com>
<CACJufxGeUsmxOhnd2760kBv-hUWRwCy7A0s45pGSPTe8DJVTGw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 20.11.23 08:58, Peter Eisentraut wrote:
> On 17.11.23 19:39, Paul Jungwirth wrote:
>> But I feel the overall approach is wrong: originally I used hardcoded
>> "=" and "&&" operators, and you asked me to look them up by strategy
>> number instead. But that leads to trouble with core gist types vs
>> btree_gist types. The core gist opclasses use RT*StrategyNumbers, but
>> btree_gist creates opclasses with BT*StrategyNumbers.
>
> Ouch.
>
> That also provides the answer to my question #2 here:
> https://www.postgresql.org/message-id/6f010a6e-8e20-658b-dc05-dc9033a694da%40eisentraut.org
>
> I don't have a good idea about this right now. Could we just change
> btree_gist perhaps? Do we need a new API for this somewhere?
After further thought, I think the right solution is to change
btree_gist (and probably also btree_gin) to use the common RT* strategy
numbers. The strategy numbers are the right interface to determine the
semantics of index AM operators. It's just that until now, nothing
external has needed this information from gist indexes (unlike btree,
hash), so it has been a free-for-all.
I don't see an ALTER OPERATOR CLASS command that could be used to
implement this. Maybe we could get away with a direct catalog UPDATE.
Or we need to make some DDL for this.
Alternatively, this could be the time to reconsider moving this into core.
view thread (66+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: SQL:2011 application time
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox