mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-09-09 16:08:49 -06:00
14 lines
277 B
MySQL
14 lines
277 B
MySQL
![]() |
CREATE OR REPLACE FUNCTION drop_ccnew_indexes() RETURNS INTEGER AS $$
|
||
|
DECLARE
|
||
|
i RECORD;
|
||
|
BEGIN
|
||
|
FOR i IN
|
||
|
(SELECT relname FROM pg_class WHERE relname like '%ccnew%')
|
||
|
LOOP
|
||
|
EXECUTE 'DROP INDEX ' || i.relname;
|
||
|
END LOOP;
|
||
|
RETURN 1;
|
||
|
END;
|
||
|
$$ LANGUAGE plpgsql;
|
||
|
|