pgsql: Fix alignment in multirange_get_range() function

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix alignment in multirange_get_range() function
Date: 2021-12-13 14:27:49
Message-ID: E1mwmIv-0003vs-Tx@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix alignment in multirange_get_range() function

The multirange_get_range() function fails when two boundaries of the same
range have different alignments. Fix that by adding proper pointer alignment.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/17300-dced2d01ddeb1f2f%40postgresql.org
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5cc9c8374093ba0e427b3309e10077708c156b6a

Modified Files
--------------
src/backend/utils/adt/multirangetypes.c | 3 +++
src/test/regress/expected/multirangetypes.out | 21 +++++++++++++++++----
src/test/regress/expected/rangetypes.out | 6 ------
src/test/regress/sql/multirangetypes.sql | 4 +++-
src/test/regress/sql/rangetypes.sql | 1 -
5 files changed, 23 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2021-12-13 14:52:07 pgsql: Default to log_checkpoints=on, log_autovacuum_min_duration=10m
Previous Message Alexander Korotkov 2021-12-13 14:27:44 pgsql: Fix alignment in multirange_get_range() function