apecloud / myduckserver

MySQL & Postgres Analytics, Reimagined
182 stars 8 forks source link

Duplicate schema entries appear when connecting to MyDuck Server via `psql`. #169

Closed TianyuZhang1214 closed 2 days ago

TianyuZhang1214 commented 3 days ago
mysql=> select schema_name FROM information_schema.schemata;
    schema_name
--------------------
 __mysql_system__
 __sys__
 information_schema
 main
 performance_schema
 pg_catalog
 public
 information_schema
 main
 pg_catalog
 information_schema
 main
 pg_catalog
(13 rows)
fanyang01 commented 2 days ago

This behavior is inherent to DuckDB and, in my opinion, is not a bug. Does it impact anything?

select * FROM information_schema.schemata;
┌──────────────┬────────────────────┬──────────────┬──────────────────────┬───────────────────────────┬────────────────────────────┬──────────┐
│ catalog_name │    schema_name     │ schema_owner │ default_character_…  │ default_character_set_s…  │ default_character_set_name │ sql_path │
│   varchar    │      varchar       │   varchar    │       varchar        │          varchar          │          varchar           │ varchar  │
├──────────────┼────────────────────┼──────────────┼──────────────────────┼───────────────────────────┼────────────────────────────┼──────────┤
│ system       │ information_schema │ duckdb       │                      │                           │                            │          │
│ system       │ main               │ duckdb       │                      │                           │                            │          │
│ system       │ pg_catalog         │ duckdb       │                      │                           │                            │          │
│ temp         │ information_schema │ duckdb       │                      │                           │                            │          │
│ temp         │ main               │ duckdb       │                      │                           │                            │          │
│ temp         │ pg_catalog         │ duckdb       │                      │                           │                            │          │
│ tmp          │ information_schema │ duckdb       │                      │                           │                            │          │
│ tmp          │ main               │ duckdb       │                      │                           │                            │          │
│ tmp          │ pg_catalog         │ duckdb       │                      │                           │                            │          │