I am trying to create a table in my database and it gives me the following error.
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.
Then I thought that the table must exist so I ran the following query:
select * from pg_tables;
But could not find anything. Then I tried:
select * from tbl_last_alert; ERROR: relation "tbl_last_alert" does not exist
Any idea how to sort this?
i am tying to rename the type by
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.
and getting the error.