Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
In function estimateColumnWidth, the atttypmod attribute for type bpchar may be -1, and will provide wrong value to columnWidths. Should estimate a valid length for any type.
case HAWQ_TYPE_BPCHAR: /* for char(n), atttypmod is n + 4 */ Assert(att->atttypmod > 4); columnWidths[(*colidx)++] = att->atttypmod;
Reproduce type:
1. create table A(a int, b bpchar);
2. select oid from pg_class where relname='a';
3. select attname, atttypmod from pg_attribute where attrelid=$oid
will see the atttypmod is -1, thus will bring error.
Attachments
Issue Links
- is related to
-
HAWQ-1145 After registering a partition table, if we want to insert some data into the table, it fails.
- Closed
- links to