Fix segmentation fault in MergeInheritedAttribute()
Peter Eisentraut <peter@eisentraut.org>
Fix segmentation fault in MergeInheritedAttribute() While converting a pg_attribute tuple into a ColumnDef, ColumnDef::compression remains NULL if there is no compression method set fot the attribute. Calling strcmp() with NULL ColumnDef::compression, when comparing compression methods of parents, causes segmentation fault in MergeInheritedAttribute(). Skip comparing compression methods if either of them is NULL. Author: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://www.postgresql.org/message-id/b22a6834-aacb-7b18-0424-a3f5fe889667%40gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +10 −6 |
| src/test/regress/expected/compression.out | modified | +7 −3 |
| src/test/regress/sql/compression.sql | modified | +5 −3 |
Discussion
- tablecmds.c/MergeAttributes() cleanup 32 messages · 2023-06-28 → 2024-05-03