|
|
@ -9648,6 +9648,7 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, |
|
|
|
Datum valuesAtt[Natts_pg_attribute]; |
|
|
|
Datum valuesAtt[Natts_pg_attribute]; |
|
|
|
bool nullsAtt[Natts_pg_attribute]; |
|
|
|
bool nullsAtt[Natts_pg_attribute]; |
|
|
|
bool replacesAtt[Natts_pg_attribute]; |
|
|
|
bool replacesAtt[Natts_pg_attribute]; |
|
|
|
|
|
|
|
HeapTuple newTup; |
|
|
|
|
|
|
|
|
|
|
|
MemSet(valuesAtt, 0, sizeof(valuesAtt)); |
|
|
|
MemSet(valuesAtt, 0, sizeof(valuesAtt)); |
|
|
|
MemSet(nullsAtt, false, sizeof(nullsAtt)); |
|
|
|
MemSet(nullsAtt, false, sizeof(nullsAtt)); |
|
|
@ -9673,8 +9674,10 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel, |
|
|
|
replacesAtt[Anum_pg_attribute_attmissingval - 1] = true; |
|
|
|
replacesAtt[Anum_pg_attribute_attmissingval - 1] = true; |
|
|
|
nullsAtt[Anum_pg_attribute_attmissingval - 1] = false; |
|
|
|
nullsAtt[Anum_pg_attribute_attmissingval - 1] = false; |
|
|
|
|
|
|
|
|
|
|
|
heapTup = heap_modify_tuple(heapTup, RelationGetDescr(attrelation), |
|
|
|
newTup = heap_modify_tuple(heapTup, RelationGetDescr(attrelation), |
|
|
|
valuesAtt, nullsAtt, replacesAtt); |
|
|
|
valuesAtt, nullsAtt, replacesAtt); |
|
|
|
|
|
|
|
heap_freetuple(heapTup); |
|
|
|
|
|
|
|
heapTup = newTup; |
|
|
|
attTup = (Form_pg_attribute) GETSTRUCT(heapTup); |
|
|
|
attTup = (Form_pg_attribute) GETSTRUCT(heapTup); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|