diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index d79cc0c5843fdb8b621783437cb9167704d86eca..a6ad3a13c076cf5cf954a4283dc8479fcc547df7 100755 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -1338,6 +1338,9 @@ static List* AddDefaultOptionsIfNeed(List* options, const char relkind, CreateSt } if (g_instance.attr.attr_storage.enable_ustore && u_sess->attr.attr_sql.enable_default_ustore_table && relkind != RELKIND_MATVIEW && !IsSystemNamespace(relnamespace) && !assignedStorageType) { + if (hasOids) { + ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("OIDS option is not supported for ustore table"))); + } DefElem *def2 = makeDefElem("storage_type", (Node *)makeString(TABLE_ACCESS_METHOD_USTORE_LOWER)); res = lappend(options, def2); }