Oid existing_relid;
ParseCallbackState pcbstate;
bool like_found = false;
+ bool is_foreign_table = IsA(stmt, CreateForeignTableStmt);
/*
* We must not scribble on the passed-in CreateStmt, so copy it. (This is
/*
* Postprocess check constraints.
*/
- transformCheckConstraints(&cxt, true);
+ transformCheckConstraints(&cxt, !is_foreign_table ? true : false);
/*
* Output results.
return;
/*
- * If creating a new table, we can safely skip validation of check
- * constraints, and nonetheless mark them valid. (This will override any
- * user-supplied NOT VALID flag.)
+ * If creating a new table (but not a foreign table), we can safely skip
+ * validation of check constraints, and nonetheless mark them valid.
+ * (This will override any user-supplied NOT VALID flag.)
*/
if (skipValidation)
{