Re: get rid of Pointer type, mostly

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, David Geier <geidav(dot)pg(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: get rid of Pointer type, mostly
Date: 2025-12-08 11:14:28
Message-ID: c6047830-fc89-4a25-8e7a-c50a94ad6e0d@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08.12.25 11:53, Chao Li wrote:
>
>
>> On Dec 8, 2025, at 18:25, David Geier <geidav(dot)pg(at)gmail(dot)com> wrote:
>>
>> Hi Peter,
>>> I went with your proposal of GinExtraPointer. See attached patch. It's
>>> based on the series of patches from Peter's initial mail. I've included
>>> the removal of the Pointer typedef in the same patch.
>>
>> It seems to me that we reached agreement. Are you planning to still
>> apply these patches?
>>
>
> Basically I am not against this patch, as 756a43689324b473ee07549a6eb7a53a203df5ad has done similar changes.
>
> What I want to understand is that why do we delete Pointer and add GinExtraPointer?
>
> ```
> -/*
> - * Pointer
> - * Variable holding address of any memory resident object.
> - * (obsolescent; use void * or char *)
> - */
> -typedef void *Pointer;
> ```
>
> And
> ```
> +typedef void *GinExtraPointer;
> ```
>
> They both are underlying “void *”. Are we expecting to improve code readability? More specific maybe?

I was planning to proceed with Dagfinn's patch set. Here is what is
currently remaining of the patch series. I haven't fully processed
everyone's comments in this thread, so they might not be reflected in
these patches.

There is some interference from the changes from palloc to
palloc_object/_array/etc., and I was also trying to figure out what to
do with the commented out code, hence the delay.

Attachment Content-Type Size
v2-0001-Remove-some-uses-of-the-Pointer-type.patch text/plain 6.5 KB
v2-0002-Convert-remaning-uses-of-Pointer-to-void.patch text/plain 17.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Geier 2025-12-08 11:27:19 Re: get rid of Pointer type, mostly
Previous Message Chao Li 2025-12-08 11:10:58 Remove unneccessary memory initialization in planner.c