在创建表时出现错误:> 错误: 类型 "test" 已经存在
HINT: 关系和与它相关联的类型名称相同,所以不能使用与任何已存在类型名称相冲突的名称.。
想删除表执行:
drop table test;
提示:> 错误: 表 "test" 不存在
解决方式:
既然它提示数据类型名称有相同。那就去查询pg库中存储数据类型有关的表pg_type。
select * from pg_type where typname='test';
一查果然存在数据,直接delete删除它就可以了:
delete from pg_type where typname='test';
之后就能创建test表了。