delete_subst.sql
1.48 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
SELECT
set_config('var.user_id', '0', FALSE);
DELETE FROM odsylacze
WHERE l_id_do IN (SELECT
id
FROM leksemy
WHERE ("leksemy"."slownik" = 'Morfologik' AND
pos IN ('subst', 'osc', 'skrs')));
DELETE FROM odsylacze
WHERE l_id_od IN (SELECT
id
FROM leksemy
WHERE ("leksemy"."slownik" = 'Morfologik' AND
leksemy.pos IN ('subst', 'osc', 'skrs')));
DELETE FROM odmieniasie
WHERE l_id IN (SELECT
id
FROM leksemy
WHERE ("leksemy"."slownik" = 'Morfologik' AND
leksemy.pos IN ('subst', 'osc', 'skrs')));
DELETE FROM leksemy_w_slownikach
WHERE l_id IN (SELECT
id
FROM leksemy
WHERE leksemy.pos IN ('subst', 'osc', 'skrs') AND
slownik = 'Morfologik');
DELETE FROM leksemy_w_slownikach
WHERE l_id IN (SELECT
id
FROM leksemy
WHERE leksemy.pos IN ('subst', 'osc', 'skrs')) AND
slownik = 'Morfologik';
DELETE FROM kwalifikatory_leksemow
WHERE lexeme_id IN (SELECT
id
FROM leksemy
WHERE leksemy.pos IN ('subst', 'osc', 'skrs') AND
slownik = 'Morfologik');
DELETE FROM "leksemy"
WHERE ("leksemy"."slownik" = 'Morfologik' AND
leksemy.pos IN ('subst', 'osc', 'skrs'));