public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: [email protected]
Subject: pgsql: Make some minor cleanups in typalign-related code.
Date: Sat, 07 Feb 2026 01:46:10 +0000
Message-ID: <[email protected]> (raw)

Make some minor cleanups in typalign-related code.

Commit 7b378237a widened AclMode to 64 bits, which implies that
the alignment of AclItem is now determined by an int64 field.
That commit correctly set the typalign for SQL type aclitem to
'd', but it missed the hard-wired knowledge about _aclitem in
bootstrap.c.  This doesn't seem to have caused any ill effects,
probably because we never try to fill a non-null value into
an aclitem[] column during bootstrap.  Nonetheless, it's clearly
a gotcha waiting to happen, so fix it up.

In passing, also fix a couple of typanalyze functions that were
using hard-coded typalign constants when they could just as
easily use greppable TYPALIGN_xxx macros.

Noticed these while working on a patch to expand the set of
typalign values.  I doubt we are going to pursue that path,
but these fixes still seem worth a quick commit.

Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7cdb633c89da82d4c6fdfba007a9ff05a9dff29e

Modified Files
--------------
src/backend/bootstrap/bootstrap.c             | 2 +-
src/backend/tsearch/ts_typanalyze.c           | 2 +-
src/backend/utils/adt/rangetypes_typanalyze.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Make some minor cleanups in typalign-related code.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox