Re: get rid of Pointer type, mostly

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: get rid of Pointer type, mostly
Date: 2025-11-24 16:09:29
Message-ID: 955002.1764000569@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> In a previous thread[0], the question was asked, 'Why do we bother with
> a "Pointer" type?'. So I looked into get rid of it.
> There are two stages to this. One is changing all code that wants to do
> pointer arithmetic to use char * instead of relying on Pointer being
> char *. Then we can change Pointer to be void * and remove a bunch of
> casts.

I'm in favor of that ...

> The second is getting rid of uses of Pointer for variables where you
> might as well use void * directly. These are actually not that many.

... but not of that. In particular, I think it's just fine if
DatumGetPointer and PointerGetDatum take and return Pointer.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-11-24 16:14:27 Re: pg_plan_advice
Previous Message Tom Lane 2025-11-24 16:06:12 Re: [PATCH] Avoid pallocs in async.c's SignalBackends critical section