@@ -162,7 +162,6 @@ static void dump_constraint_common(const char *nsp, const char *relname,
162
162
Form_pg_constraint con , StringInfo buf );
163
163
static int decompile_column_index_array (Datum column_index_array , Oid relId ,
164
164
StringInfo buf );
165
- static bool data_type_changed (TupleConversionMapExt * conv_map );
166
165
167
166
/*
168
167
* 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,
1181
1180
* VALID. See the comments of copy_constraints() for details.
1182
1181
*/
1183
1182
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
- }
1196
1183
1197
1184
if (partitions == NULL )
1198
1185
{
@@ -3315,25 +3302,3 @@ decompile_column_index_array(Datum column_index_array, Oid relId,
3315
3302
3316
3303
return nKeys ;
3317
3304
}
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