delete_ndm.sql
1.37 KB
SELECT set_config('var.user_id', '0', false);
delete FROM odsylacze WHERE l_id_od in (select id from leksemy where ("leksemy"."slownik" = 'Morfologik' and pos in ('adv', 'advcom', 'conj', 'burk', 'interj', 'prep', 'qub', 'comp', 'advndm')));
delete FROM odsylacze WHERE l_id_do in (select id from leksemy where ("leksemy"."slownik" = 'Morfologik' and pos in ('adv', 'advcom', 'conj', 'burk', 'interj', 'prep', 'qub', 'comp', 'advndm')));
delete FROM odmieniasie WHERE l_id in (select id from leksemy where ("leksemy"."slownik" = 'Morfologik' and leksemy.pos in ('adv', 'advcom', 'conj', 'burk', 'interj', 'prep', 'qub', 'comp', 'advndm')));
delete FROM leksemy_w_slownikach WHERE l_id in (select id from leksemy where leksemy.pos in ('adv', 'advcom', 'conj', 'burk', 'interj', 'prep', 'qub', 'comp', 'advndm') and slownik = 'Morfologik');
delete FROM leksemy_w_slownikach WHERE l_id in (select id from leksemy where leksemy.pos in ('adv', 'advcom', 'conj', 'burk', 'interj', 'prep', 'qub', 'comp', 'advndm')) and slownik = 'Morfologik';
delete FROM kwalifikatory_leksemow WHERE lexeme_id in (select id from leksemy where leksemy.pos in ('adv', 'advcom', 'conj', 'burk', 'interj', 'prep', 'qub', 'comp', 'advndm') and slownik = 'Morfologik');
delete FROM "leksemy" WHERE ("leksemy"."slownik" = 'Morfologik' and leksemy.pos in ('adv', 'advcom', 'conj', 'burk', 'interj', 'prep', 'qub', 'comp', 'advndm'));