mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-18 05:50:41 +00:00
* WIP: pg_catalog * refactor: move memory_table to crate public level to reuse it in pgcatalog * refactor: new system_schema mod to manage implementation of information_schema and pg_catalog * feat: pg_catalog.pg_type * fix: remove unused code to avoid warning * test: add pg_catalog sqlness test * feat: pg_catalog_cache in system_catalog * fix: integration test * test: rollback unit test * refactor: mix pg_catalog table_id with old ones * fix: add todo information * tests: rerun sqlness --------- Co-authored-by: johnsonlee <johnsonlee@localhost.localdomain>
74 lines
1.7 KiB
Plaintext
74 lines
1.7 KiB
Plaintext
CREATE DATABASE mydb WITH (ttl = '1h');
|
|
|
|
Affected Rows: 1
|
|
|
|
SHOW DATABASES;
|
|
|
|
+--------------------+
|
|
| Database |
|
|
+--------------------+
|
|
| greptime_private |
|
|
| information_schema |
|
|
| mydb |
|
|
| pg_catalog |
|
|
| public |
|
|
+--------------------+
|
|
|
|
SHOW FULL DATABASES;
|
|
|
|
+--------------------+----------+
|
|
| Database | Options |
|
|
+--------------------+----------+
|
|
| greptime_private | |
|
|
| information_schema | |
|
|
| mydb | ttl='1h' |
|
|
| pg_catalog | |
|
|
| public | |
|
|
+--------------------+----------+
|
|
|
|
USE mydb;
|
|
|
|
Affected Rows: 0
|
|
|
|
CREATE TABLE test(host STRING, cpu DOUBLE, ts TIMESTAMP TIME INDEX);
|
|
|
|
Affected Rows: 0
|
|
|
|
SHOW CREATE TABLE test;
|
|
|
|
+-------+-------------------------------------+
|
|
| Table | Create Table |
|
|
+-------+-------------------------------------+
|
|
| test | CREATE TABLE IF NOT EXISTS "test" ( |
|
|
| | "host" STRING NULL, |
|
|
| | "cpu" DOUBLE NULL, |
|
|
| | "ts" TIMESTAMP(3) NOT NULL, |
|
|
| | TIME INDEX ("ts") |
|
|
| | ) |
|
|
| | |
|
|
| | ENGINE=mito |
|
|
| | WITH( |
|
|
| | ttl = '1h' |
|
|
| | ) |
|
|
+-------+-------------------------------------+
|
|
|
|
USE public;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP DATABASE mydb;
|
|
|
|
Affected Rows: 0
|
|
|
|
SHOW DATABASES;
|
|
|
|
+--------------------+
|
|
| Database |
|
|
+--------------------+
|
|
| greptime_private |
|
|
| information_schema |
|
|
| pg_catalog |
|
|
| public |
|
|
+--------------------+
|
|
|