Re: don't include tableam.h in nbtree.h

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: don't include tableam.h in nbtree.h
Date: 2025-08-05 14:58:14
Message-ID: aJIcBkD0kUn+7dj/@ip-10-97-1-34.eu-west-3.compute.internal
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Aug 05, 2025 at 01:09:57PM +0200, Álvaro Herrera wrote:
> I noticed that nbtree.h includes tableam.h. This seems rather random
> and unnecessary. This patch removes it and fixes fallout, which is
> pretty minimal. We do need to add a forward declaration of struct
> TM_IndexDeleteOp (whose full definition appears in tableam.h) so that
> _bt_delitems_delete_check()'s declaration can use it.

I think that makes sense.

index 1127597bb60..8282055ebca 100644
--- a/contrib/btree_gist/btree_bool.c
+++ b/contrib/btree_gist/btree_bool.c
@@ -6,6 +6,7 @@
#include "btree_gist.h"
#include "btree_utils_num.h"
#include "utils/sortsupport.h"
+#include "utils/rel.h"

There is several places like this one where the new include is not ordered based
on the ASCII values (while it looks like it should be according to 7e735035f2).

Shouldn't that be the case? If so, PFA a patch to apply on top of your v1.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
ascii_order.txt text/plain 6.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-08-05 14:59:01 Re: Test to dump and restore objects left behind by regression
Previous Message Tomas Vondra 2025-08-05 14:52:44 Re: index prefetching