From: | Japin Li <japinli(at)hotmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: IndexAmRoutine aminsertcleanup function can be NULL? |
Date: | 2025-07-17 05:34:42 |
Message-ID: | ME0P300MB0445795D31CEAB92C58B41FDB651A@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 16 Jul 2025 at 10:08, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> 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?
>
It appears commit c1ec02be1d79 is missing the 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
>
How about asserting the existence of all required callbacks, similar to
GetTableAmRoutine()?
--
Regards,
Japin Li
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Herrera | 2025-07-17 05:47:52 | Re: Log prefix missing for subscriber log messages received from publisher |
Previous Message | vignesh C | 2025-07-17 05:32:30 | Re: Log prefix missing for subscriber log messages received from publisher |