We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent05eb923 commit89d52b9Copy full SHA for 89d52b9
src/backend/commands/tablecmds.c
@@ -9747,6 +9747,7 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
9747
DatumvaluesAtt[Natts_pg_attribute];
9748
boolnullsAtt[Natts_pg_attribute];
9749
boolreplacesAtt[Natts_pg_attribute];
9750
+HeapTuplenewTup;
9751
9752
MemSet(valuesAtt,0,sizeof(valuesAtt));
9753
MemSet(nullsAtt, false,sizeof(nullsAtt));
@@ -9772,8 +9773,10 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
9772
9773
replacesAtt[Anum_pg_attribute_attmissingval-1]= true;
9774
nullsAtt[Anum_pg_attribute_attmissingval-1]= false;
9775
-heapTup=heap_modify_tuple(heapTup,RelationGetDescr(attrelation),
9776
-valuesAtt,nullsAtt,replacesAtt);
+newTup=heap_modify_tuple(heapTup,RelationGetDescr(attrelation),
9777
+valuesAtt,nullsAtt,replacesAtt);
9778
+heap_freetuple(heapTup);
9779
+heapTup=newTup;
9780
attTup= (Form_pg_attribute)GETSTRUCT(heapTup);
9781
}
9782