pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Change gist stratnum function to use CompareType
3+ messages / 2 participants
[nested] [flat]
* pgsql: Change gist stratnum function to use CompareType
@ 2025-01-15 10:41 Peter Eisentraut <peter@eisentraut.org>
0 siblings, 1 reply; 3+ messages in thread
From: Peter Eisentraut @ 2025-01-15 10:41 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Change gist stratnum function to use CompareType
This changes commit 7406ab623fe in that the gist strategy number
mapping support function is changed to use the CompareType enum as
input, instead of the "well-known" RT*StrategyNumber strategy numbers.
This is a bit cleaner, since you are not dealing with two sets of
strategy numbers. Also, this will enable us to subsume this system
into a more general system of using CompareType to define operator
semantics across index methods.
Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/630f9a43cece93cb4a5c243b30e34abce6a89514
Modified Files
--------------
contrib/btree_gist/btree_gist--1.7--1.8.sql | 54 ++++++++++++++--------------
contrib/btree_gist/btree_gist.c | 15 ++++----
contrib/btree_gist/expected/stratnum.out | 4 +--
contrib/btree_gist/sql/stratnum.sql | 4 +--
doc/src/sgml/gist.sgml | 24 ++++++-------
doc/src/sgml/xindex.sgml | 2 +-
src/backend/access/gist/gistutil.c | 35 +++++++++++++-----
src/backend/access/gist/gistvalidate.c | 2 +-
src/backend/catalog/pg_constraint.c | 20 +++++------
src/backend/commands/indexcmds.c | 50 +++++++++++++-------------
src/backend/commands/tablecmds.c | 10 +++---
src/backend/executor/execReplication.c | 2 +-
src/include/access/gist.h | 3 +-
src/include/catalog/pg_amproc.dat | 12 +++----
src/include/catalog/pg_proc.dat | 6 ++--
src/include/commands/defrem.h | 4 +--
src/include/nodes/primnodes.h | 4 ++-
src/test/regress/expected/misc_functions.out | 16 ++++-----
src/test/regress/sql/misc_functions.sql | 4 +--
19 files changed, 145 insertions(+), 126 deletions(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Change gist stratnum function to use CompareType
@ 2025-01-15 21:36 Melanie Plageman <melanieplageman@gmail.com>
parent: Peter Eisentraut <peter@eisentraut.org>
0 siblings, 1 reply; 3+ messages in thread
From: Melanie Plageman @ 2025-01-15 21:36 UTC (permalink / raw)
To: Peter Eisentraut <peter@eisentraut.org>; +Cc: pgsql-committers@lists.postgresql.org
On Wed, Jan 15, 2025 at 5:41 AM Peter Eisentraut <peter@eisentraut.org> wrote:
>
> Change gist stratnum function to use CompareType
>
> This changes commit 7406ab623fe in that the gist strategy number
> mapping support function is changed to use the CompareType enum as
> input, instead of the "well-known" RT*StrategyNumber strategy numbers.
>
> This is a bit cleaner, since you are not dealing with two sets of
> strategy numbers. Also, this will enable us to subsume this system
> into a more general system of using CompareType to define operator
> semantics across index methods.
This appears to fail the headers_cpluspluscheck job in CI [1] with
/tmp/cirrus-ci-build/src/include/access/gist.h:251:63: error: use of
enum ‘CompareType’ without previous declaration
251 | extern StrategyNumber GistTranslateStratnum(Oid opclass, enum
CompareType cmp);
- Melanie
[1] https://github.com/postgres/postgres/runs/35644016115
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Change gist stratnum function to use CompareType
@ 2025-01-15 22:14 Peter Eisentraut <peter@eisentraut.org>
parent: Melanie Plageman <melanieplageman@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2025-01-15 22:14 UTC (permalink / raw)
To: Melanie Plageman <melanieplageman@gmail.com>; +Cc: pgsql-committers@lists.postgresql.org
On 15.01.25 22:36, Melanie Plageman wrote:
> On Wed, Jan 15, 2025 at 5:41 AM Peter Eisentraut <peter@eisentraut.org> wrote:
>>
>> Change gist stratnum function to use CompareType
>>
>> This changes commit 7406ab623fe in that the gist strategy number
>> mapping support function is changed to use the CompareType enum as
>> input, instead of the "well-known" RT*StrategyNumber strategy numbers.
>>
>> This is a bit cleaner, since you are not dealing with two sets of
>> strategy numbers. Also, this will enable us to subsume this system
>> into a more general system of using CompareType to define operator
>> semantics across index methods.
>
> This appears to fail the headers_cpluspluscheck job in CI [1] with
>
> /tmp/cirrus-ci-build/src/include/access/gist.h:251:63: error: use of
> enum ‘CompareType’ without previous declaration
> 251 | extern StrategyNumber GistTranslateStratnum(Oid opclass, enum
> CompareType cmp);
Fixed, thanks.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-01-15 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-01-15 10:41 pgsql: Change gist stratnum function to use CompareType Peter Eisentraut <peter@eisentraut.org>
2025-01-15 21:36 ` Melanie Plageman <melanieplageman@gmail.com>
2025-01-15 22:14 ` Peter Eisentraut <peter@eisentraut.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox