1
2
3
4
5 DO $$
6DECLARE
7 a integer := 10;
8 b integer := 20;
9BEGIN
10 IF a > b THEN
11 RAISE NOTICE 'a is greater than b';
12 END IF;
13
14 IF a < b THEN
15 RAISE NOTICE 'a is less than b';
16 END IF;
17
18 IF a = b THEN
19 RAISE NOTICE 'a is equal to b';
20 END IF;
21END $$;
22