Re: get rid of Pointer type, mostly
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-11-24T16:09:29Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove no longer needed casts from Pointer
- e158fd4d68f4 19 (unreleased) landed
-
Remove no longer needed casts to Pointer
- c6be3daa054a 19 (unreleased) landed
-
Change Pointer to void *
- 1b2bb5077e9e 19 (unreleased) landed
-
Don't rely on pointer arithmetic with Pointer type
- 756a43689324 19 (unreleased) landed
-
Use more appropriate DatumGet* function
- 8c6bbd674ed8 19 (unreleased) landed
-
Remove useless casts to Pointer
- 623801b3bdb4 19 (unreleased) landed
Peter Eisentraut <peter@eisentraut.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