]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Make some minor cleanups in typalign-related code.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 7 Feb 2026 01:46:03 +0000 (20:46 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 7 Feb 2026 01:46:03 +0000 (20:46 -0500)
commit7cdb633c89da82d4c6fdfba007a9ff05a9dff29e
tree96157cef3843a78bbc7701eb06ca693abf03e760
parentba1e14134a775e56a76c1537936c61102827507f
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/1127261.1769649624@sss.pgh.pa.us
src/backend/bootstrap/bootstrap.c
src/backend/tsearch/ts_typanalyze.c
src/backend/utils/adt/rangetypes_typanalyze.c