@@ -162,7 +162,6 @@ static void dump_constraint_common(const char *nsp, const char *relname,
162162 Form_pg_constraint con , StringInfo buf );
163163static int decompile_column_index_array (Datum column_index_array , Oid relId ,
164164 StringInfo buf );
165- static bool data_type_changed (TupleConversionMapExt * conv_map );
166165
167166/*
168167 * The maximum time to hold AccessExclusiveLock on the source table during the
@@ -1181,18 +1180,6 @@ rewrite_table_impl(char *relschema_src, char *relname_src,
11811180 * VALID. See the comments of copy_constraints() for details.
11821181 */
11831182 copy_constraints (relid_dst , relname_src , relid_src );
1184- /*
1185- * TODO If the data type does not really require constraint validation
1186- * (some research is needed in this area), or if the user explicitly
1187- * asks to skip the validation, just set convalidated in the
1188- * corresponding rows of pg_constraint. Also use the "fast path" if
1189- * none of the constraints references the columns with changed data
1190- * type.
1191- */
1192- if (!data_type_changed (conv_map ))
1193- {
1194-
1195- }
11961183
11971184 if (partitions == NULL )
11981185 {
@@ -3315,25 +3302,3 @@ decompile_column_index_array(Datum column_index_array, Oid relId,
33153302
33163303 return nKeys ;
33173304}
3318-
3319- /*
3320- * Check if any column of the destination relation has a data type different
3321- * from the corresponding column of the source relation.
3322- */
3323- static bool
3324- data_type_changed (TupleConversionMapExt * conv_map )
3325- {
3326- AttrMapExt * attrMap ;
3327-
3328- if (conv_map == NULL )
3329- return false;
3330-
3331- attrMap = conv_map -> attrMap ;
3332- for (int i = 0 ; i < attrMap -> maplen ; i ++ )
3333- {
3334- if (attrMap -> coerceExprs [i ])
3335- return true;
3336- }
3337-
3338- return false;
3339- }
0 commit comments