This is an automated email from the ASF dual-hosted git repository. gfphoenix78 pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push: new 612ef79d4c Check whether attr_encodings is null when call AddRelationAttributeEncodings (#1001) 612ef79d4c is described below commit 612ef79d4c8a65e481dfcf05f5218268430002e9 Author: Xun Gong <gong...@hashdata.cn> AuthorDate: Thu Apr 3 11:36:08 2025 +0800 Check whether attr_encodings is null when call AddRelationAttributeEncodings (#1001) For ALTER TABLE xxx ADD COLUMN a int; If the custom table am implements the transform_column_encoding_clauses interface, but 'colDefs', 'stenc', and 'withOptions' are all empty, transformColumnEncoding may return null. so it should check whether attr_encodings is null when call AddRelationAttributeEncodings --- src/backend/catalog/pg_attribute_encoding.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/catalog/pg_attribute_encoding.c b/src/backend/catalog/pg_attribute_encoding.c index 92dced7437..5ed1558f4f 100644 --- a/src/backend/catalog/pg_attribute_encoding.c +++ b/src/backend/catalog/pg_attribute_encoding.c @@ -256,6 +256,8 @@ RelationGetAttributeOptions(Relation rel) void AddRelationAttributeEncodings(Relation rel, List *attr_encodings) { + if (!attr_encodings) + return; Oid relid = RelationGetRelid(rel); ListCell *lc; ListCell *lc_filenum; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org