Re: SQL:2011 application time

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: SQL:2011 application time
Date: 2023-12-06 08:59:33
Message-ID: 35400587-6865-4a2c-9ea4-4761669478ea@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02.12.23 19:41, Paul Jungwirth wrote:
> So what do you think of this idea instead?:
>
> We could add a new (optional) support function to GiST that translates
> "well-known" strategy numbers into the opclass's own strategy numbers.
> This would be support function 12. Then we can say
> translateStrategyNumber(RTEqualStrategyNumber) and look up the operator
> with the result.
>
> There is not a performance hit, because we do this for the DDL command
> (create pk/uq/fk), then store the operator in the index/constraint.
>
> If you don't provide this new support function, then creating the
> pk/uq/fk fails with a hint about what you can do to make it work.
>
> This approach means we don't change the rules about GiST opclasses: you
> can still use the stranums how you like.
>
> This function would also let me support non-range "temporal" foreign
> keys, where I'll need to build queries with && and maybe other operators.

I had some conversations about this behind the scenes. I think this
idea makes sense.

The other idea was that we create new strategy numbers, like
TemporalEqualsStrategy / TemporalOverlapsStrategy. But then you'd have
the situation where some strategy numbers are reserved and others are
not, so perhaps that is not so clean. I think your idea is good.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2023-12-06 09:05:13 Re: logical decoding and replication of sequences, take 2
Previous Message Amit Kapila 2023-12-06 08:56:21 Re: logical decoding and replication of sequences, take 2