IndexAmRoutine aminsertcleanup function can be NULL?

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: IndexAmRoutine aminsertcleanup function can be NULL?
Date: 2025-07-16 00:08:07
Message-ID: CAHut+PvgYcPmPDi1YdHMJY5upnyGRpc0N8pk1xNB11xDSBwNog@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers.

I happened to notice that many contrib module indexes do not implement
an aminsertcleanup function:
e.g. amroutine->aminsertcleanup = NULL;

But, unlike many of the other interface functions, the aminsertcleanup
does not say "/* can be NULL */" in the typedef struct IndexAmRoutine
[1].

What's going on there? Is it just an accidentally missing "/* can be
NULL */" comment?

Same also in the documentation... [2]

======
[1] https://github.com/postgres/postgres/blob/master/src/include/access/amapi.h
[2] https://www.postgresql.org/docs/devel/index-api.html

Kind Regards,
Peter Smith.
Fujitsu Australia

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Junwang Zhao 2025-07-16 00:12:53 Re: remove WITHOUT OIDS syntax for v19
Previous Message Junwang Zhao 2025-07-16 00:06:44 Re: remove WITHOUT OIDS syntax for v19