You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue for the same feature request?
I have checked the existing issues.
Is your feature request related to a problem?
Right now information_schema.table_constraints is a table, no data.
InformationSchemaTableConstraintsDDL = "CREATE TABLE information_schema.TABLE_CONSTRAINTS (" + "CONSTRAINT_CATALOG varchar(64)," + "CONSTRAINT_SCHEMA varchar(64)," + "CONSTRAINT_NAME varchar(64)," + "TABLE_SCHEMA varchar(64)," + "TABLE_NAME varchar(64)," + "CONSTRAINT_TYPE varchar(11) NOT NULL DEFAULT ''," + "ENFORCED varchar(3) NOT NULL DEFAULT ''" + ")"
This implementation is essentially wrong. EVERYTHING in information_schema should be a view. So the implementation should be like the following,
InformationSchemaReferentialConstraintsDDL = "CREATE VIEW information_schema.REFERENTIAL_CONSTRAINTS AS " +
"SELECT DISTINCT " +
"'def' AS CONSTRAINT_CATALOG, " +
"fk.db_name AS CONSTRAINT_SCHEMA, " +
"fk.constraint_name AS CONSTRAINT_NAME, " +
"'def' AS UNIQUE_CONSTRAINT_CATALOG, " +
"fk.refer_db_name AS UNIQUE_CONSTRAINT_SCHEMA, " +
"idx.type AS UNIQUE_CONSTRAINT_NAME," +
"'NONE' AS MATCH_OPTION, " +
"fk.on_update AS UPDATE_RULE, " +
"fk.on_delete AS DELETE_RULE, " +
"fk.table_name AS TABLE_NAME, " +
"fk.refer_table_name AS REFERENCED_TABLE_NAME " +
"FROM mo_catalog.mo_foreign_keys fk " +
"JOIN mo_catalog.mo_indexes idx ON (fk.refer_column_name = idx.column_name)"
Describe the feature you'd like
Seems mo_catalog.mo_indexes has everything you need, so just a view on it should probably be fine.
There needs to be an upgrade step.
Describe implementation you've considered
No response
Documentation, Adoption, Use Case, Migration Strategy
Additional information
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for the same feature request?
Is your feature request related to a problem?
Describe the feature you'd like
Seems mo_catalog.mo_indexes has everything you need, so just a view on it should probably be fine.
There needs to be an upgrade step.
Describe implementation you've considered
No response
Documentation, Adoption, Use Case, Migration Strategy
Additional information
No response
The text was updated successfully, but these errors were encountered: