架构:
hg=# \dn
_timescaledb_cache | postgres
_timescaledb_catalog | postgres
_timescaledb_internal | postgres
hg_quotes_raw | zoolander
hg_trade_volume_1m | zoolander
hg_trade_volume_day | zoolander
hg_trades_raw | zoolander
public | postgres
在每个
hg_xxx
hg\u报价\u原始:
hg=# \dt hg_quotes_raw.*
hg_quotes_raw | hgf7 | table | zoolander
hg_quotes_raw | hgf8 | table | zoolander
...
hg_quotes_raw | hgz6 | table | zoolander
hg_quotes_raw | hgz7 | table | zoolander
汞贸易量:
hg=# \dt hg_trade_volume_1m.*
hg_trade_volume_1m | hgf7 | table | zoolander
hg_trade_volume_1m | hgf8 | table | zoolander
...
hg_trade_volume_1m | hgz6 | table | zoolander
hg_trade_volume_1m | hgz7 | table | zoolander
我有一张这样的桌子,
hg_trade_volume_1m.hgq8
,详情如下:
hg=# \d hg_trade_volume_1m.hgq8
time | timestamp with time zone | | not null |
volume | integer | | |
hg=# select * from hg_trade_volume_1m.hgq8 limit 5;
2016-12-16 09:32:00-05 | 88
2016-12-16 13:45:00-05 | 88
2016-12-22 13:42:00-05 | 86
2017-01-04 11:43:00-05 | 43
2017-01-04 13:38:00-05 | 22
问题:
滴
在这张桌子上,我说了一个错误
不同的模式
不存在:
hg=# drop table if exists hg_trade_volume_1m.hgq8;
ERROR: schema "hg_raw_quotes" does not exist
在此drop语句之后,我的表仍然存在:
hg=#\d hg_贸易量_1m.hgq8
时区为| |的时间戳不为空|
体积|整数| ||
hg=#从hg_trade_volume_1m中选择*hgq8 limit 5;
2016-12-16 09:32:00-05 | 88
2016-12-16 13:45:00-05 | 88
2016-12-22 13:42:00-05 | 86
2017-01-04 11:43:00-05 | 43
问题:
笔记:
错误消息中提到的架构曾经存在,但后来已从数据库中删除。
hg=# \dn hg_raw_quotes