| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Remove Item type |
| Date: | 2025-10-27 09:19:59 |
| Message-ID: | E1vDJOR-003j6f-0A@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Remove Item type
This type is just char * underneath, it provides no real value, no
type safety, and just makes the code one level more mysterious. It is
more idiomatic to refer to blobs of memory by a combination of void *
and size_t, so change it to that.
Also, since this type hides the pointerness, we can't apply qualifiers
to what is pointed to, which requires some unconstify nonsense. This
change allows fixing that.
Extension code that uses the Item type can change its code to use
void * to be backward compatible.
Reviewed-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Peter Geoghegan <pg(at)bowt(dot)ie>
Discussion: https://www.postgresql.org/message-id/flat/c75cccf5-5709-407b-a36a-2ae6570be766(at)eisentraut(dot)org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/76acf4b722faa2a552f62034b793c2797909f91b
Modified Files
--------------
src/backend/access/brin/brin_pageops.c | 8 +++---
src/backend/access/brin/brin_xlog.c | 4 +--
src/backend/access/gin/ginentrypage.c | 8 +++---
src/backend/access/gin/ginfast.c | 4 +--
src/backend/access/gin/ginvacuum.c | 2 +-
src/backend/access/gin/ginxlog.c | 7 +++--
src/backend/access/gist/gist.c | 5 ++--
src/backend/access/gist/gistbuild.c | 2 +-
src/backend/access/gist/gistutil.c | 2 +-
src/backend/access/gist/gistxlog.c | 4 +--
src/backend/access/hash/hash_xlog.c | 7 +++--
src/backend/access/hash/hashinsert.c | 12 +++------
src/backend/access/heap/heapam_xlog.c | 7 +++--
src/backend/access/heap/hio.c | 4 +--
src/backend/access/heap/rewriteheap.c | 3 +--
src/backend/access/nbtree/nbtdedup.c | 9 +++----
src/backend/access/nbtree/nbtinsert.c | 18 +++++--------
src/backend/access/nbtree/nbtpage.c | 9 +++----
src/backend/access/nbtree/nbtsort.c | 6 ++---
src/backend/access/nbtree/nbtxlog.c | 48 ++++++++++++---------------------
src/backend/access/spgist/spgdoinsert.c | 36 +++++++++++--------------
src/backend/access/spgist/spgutils.c | 2 +-
src/backend/access/spgist/spgxlog.c | 32 +++++++++-------------
src/backend/commands/sequence.c | 6 ++---
src/backend/storage/page/bufpage.c | 4 +--
src/include/access/spgist_private.h | 2 +-
src/include/storage/bufpage.h | 9 +++----
src/include/storage/item.h | 19 -------------
src/tools/pgindent/typedefs.list | 1 -
29 files changed, 102 insertions(+), 178 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dean Rasheed | 2025-10-27 10:23:23 | pgsql: Add new RLS tests to test policies applied by command type. |
| Previous Message | Peter Eisentraut | 2025-10-27 08:02:35 | pgsql: Remove meaninglist restrict qualifiers |