【发布时间】:2014-03-12 06:42:35
【问题描述】:
我试图在我的数据库中创建一个表,它给了我以下错误。
ERROR: type "tbl_last_alert" already exists HINT: A relation has an associated type of the same name, so you must use a name that doesn't conflict with any existing type.
然后我认为该表必须存在所以我运行了以下查询:
select * from pg_tables;
但是找不到任何东西。然后我尝试了:
select * from tbl_last_alert; ERROR: relation "tbl_last_alert" does not exist
知道如何排序吗?
我想通过
重命名类型ALTER TYPE v4report.tbl_last_alert RENAME TO tbl_last_alert_old;
ERROR: v4report.tbl_last_alert is a table's row type
HINT: Use ALTER TABLE instead.
并得到错误。
【问题讨论】:
标签: sql postgresql database-administration