Files
greptimedb/tests/cases/standalone/common/information_schema/table_constraints.sql
Yohan Wal c4db9e8aa7 fix!: forbid to change information_schema (#4233)
* fix: forbid to change tables in information_schema

* refactor: use unified read-only check function

* test: add more sqlness tests for information_schema

* refactor: move is_readonly_schema to common_catalog
2024-07-03 03:09:23 +00:00

22 lines
496 B
SQL

--- test information_schema.table_constraints ----
USE INFORMATION_SCHEMA;
DESC TABLE TABLE_CONSTRAINTS;
SELECT * FROM TABLE_CONSTRAINTS ORDER BY TABLE_NAME, CONSTRAINT_NAME;
use public;
CREATE TABLE test(i double, j string, ts timestamp time index, primary key(j));
use INFORMATION_SCHEMA;
SELECT * FROM TABLE_CONSTRAINTS ORDER BY TABLE_NAME, CONSTRAINT_NAME;
SELECT * FROM TABLE_CONSTRAINTS WHERE TABLE_NAME = 'test' ORDER BY TABLE_NAME, CONSTRAINT_NAME;
use public;
DROP TABLE test;