File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ \echo Menu:
2
+ \echo ' 1 – Database object sizes'
3
+ \echo ' 2 – Bloat'
4
+ \echo ' 3 – pg_stat_statementis'
5
+ \echo ' q – Quit from this tool'
6
+ \echo
7
+ \echo 'Type your choice (1-3) and press <Enter>:'
8
+ \prompt d_step_unq
9
+ \set d_stp '\'' :d_step_unq '\''
10
+ select
11
+ :d_stp::text = '1' as d_step_is_1,
12
+ :d_stp::text = '2' as d_step_is_2,
13
+ :d_stp::text = '3' as d_step_is_3,
14
+ :d_stp::text = 'q' as d_step_is_q \gset
15
+ \if :d_step_is_1
16
+ \echo ' 1 is chosen!'
17
+ \prompt 'Press any key…' d_dummy
18
+ \i index.sql
19
+ \elif :d_step_is_2
20
+ \echo ' 2 is chosen!'
21
+ \prompt 'Press any key…' d_dummy
22
+ \i index.sql
23
+ \elif :d_step_is_3
24
+ \echo ' 3 is chosen!'
25
+ \prompt 'Press any key…' d_dummy
26
+ \i index.sql
27
+ \elif :d_step_is_q
28
+ \echo '...bye!'
29
+ \else
30
+ \echo 'ERROR: Unkown option!'
31
+ \i index.sql
32
+ \endif
You can’t perform that action at this time.
0 commit comments