delete_ndm.sql
2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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'));