It is weird that the index name needs quotation around it. Below command worked absolutely fine and dropped the index as well
drop index my_schema."users_dept_idx"
Answer from newbie on Stack Overflowproblem with DROP INDEX
how to create big indexes
ERROR: Constraint "constraint_name" of relation "relation_name" does not exist; ERROR relation "relation_name" already exists.
When adding a UNIQUE INDEX, is the constraint added automatically?
It is weird that the index name needs quotation around it. Below command worked absolutely fine and dropped the index as well
drop index my_schema."users_dept_idx"
I had a similar problem. It turns out that when you create an index it is created in the same schema as the underlying table. In this case, you don't have to use the "schema" part of the name. When you drop it you have to use the full name of the index:
create index if not exists ah_login_minute on api.acc_history(login,updated_minute);
drop index if exists ah_login_minute; -- this fails, you have to use full name
drop index if exists api.ah_login_minute; -- this works
Hi all,
for my query, i create multiple indices and then drop them after the query execution..
CREATE INDEX IF NOT EXISTS idx_a_id on tbl_a(a_id)
then
DROP INDEX CONCURRENTLY IF EXISTS idx_a_id;
my problem is that sometimes it hangs on the drop index command for hours so I am supposed to break execution..
Maybe someone will be able to give me some tips on what to do in this situation.
Thanks in advise..