【发布时间】:2021-09-02 04:24:07
【问题描述】:
我正在使用 cockroachdb,它本质上是 postgres 的超集,我不明白为什么会这样声明:
select * from _a66df261120b6c23.tabDefaultValue;
导致错误:
ERROR: relation "_a66df261120b6c23.tabdefaultvalue" does not exist
show databases 给我:
database_name | owner | primary_region | regions | survival_goal
--------------------+-------+----------------+---------+----------------
_a66df261120b6c23 | root | NULL | {} | NULL
defaultdb | root | NULL | {} | NULL
postgres | root | NULL | {} | NULL
root | root | NULL | {} | NULL
sammy | root | NULL | {} | NULL
system | node | NULL | {} | NULL
test123 | root | NULL | {} | NULL
test3 | root | NULL | {} | NULL
test4 | root | NULL | {} | NULL
test5 | root | NULL | {} | NULL
test9 | root | NULL | {} | NULL
show tables from _a66df261120b6c23 给了我:
schema_name | table_name | type | owner | estimated_row_count | locality
--------------+-------------------+-------+-------+---------------------+-----------
public | __Auth | table | root | 0 | NULL
public | tabDefaultValue | table | root | 0 | NULL
数据库和表都存在,为什么select * from _a66df261120b6c23.tabDefaultValue;会失败?奇怪的是,当我运行\dt 时,我得到的只是:
schema_name | table_name | type | owner | estimated_row_count | locality
--------------+------------+-------+-------+---------------------+-----------
public | sammy | table | root | 0 | NULL
如何让select 语句真正起作用?谢谢
【问题讨论】:
标签: cockroachdb