Skip to content

Commit 5bc1e70

Browse files
committed
set postgres_dba.wide = 'on'; to turn on 'wide' mode
1 parent a01fad0 commit 5bc1e70

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

init/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OUT="start.psql"
66

77
cd "$DIR/.."
88
echo "" > "$OUT"
9-
echo "select coalesce(current_setting('postgresdba.extended', true), 'off') = 'on' as postgresdba_extended \\gset" >> "$OUT"
9+
echo "select coalesce(current_setting('postgres_dba.wide', true), 'off') = 'on' as postgres_dba_xon \\gset" >> "$OUT"
1010
echo "\\echo '\\033[1;35mMenu:\\033[0m'" >> "$OUT"
1111
for f in ./sql/*.sql
1212
do

sql/2_table_sizes.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ select
4242
pg_size_pretty(table_bytes) || ' (' || round(100 * table_bytes::numeric / sum(table_bytes) over (partition by (schema_name is null)), 2)::text || '%)' as "Table Size",
4343
pg_size_pretty(index_bytes) || ' (' || round(100 * index_bytes::numeric / sum(index_bytes) over (partition by (schema_name is null)), 2)::text || '%)' as "Index(es) Size",
4444
pg_size_pretty(toast_bytes) || ' (' || round(100 * toast_bytes::numeric / sum(toast_bytes) over (partition by (schema_name is null)), 2)::text || '%)' as "TOAST Size"
45-
\if :postgresdba_extended
45+
\if :postgres_dba_xon
4646
,
4747
row_estimate,
4848
total_bytes,

sql/b1_table_estimation.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ select
7272
'~' || pg_size_pretty(bloat_size::numeric)::text || ' (' || round(bloat_ratio::numeric, 2)::text || '%)' as "Bloat",
7373
'~' || pg_size_pretty((real_size - bloat_size)::numeric) as "Live",
7474
fillfactor
75-
\if :postgresdba_extended
75+
\if :postgres_dba_xon
7676
,
7777
real_size as real_size_raw,
7878
extra_size as extra_size_raw,

sql/b2_btree_estimation.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ select
105105
'~' || pg_size_pretty(bloat_size::numeric)::text || ' (' || round(bloat_ratio::numeric, 2)::text || '%)' as "Bloat",
106106
'~' || pg_size_pretty((real_size - bloat_size)::numeric) as "Live",
107107
fillfactor
108-
\if :postgresdba_extended
108+
\if :postgres_dba_xon
109109
,
110110
schema_name,
111111
table_name,

start.psql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
select coalesce(current_setting('postgresdba.extended', true), 'off') = 'on' as postgresdba_extended \gset
2+
select coalesce(current_setting('postgres_dba.wide', true), 'off') = 'on' as postgres_dba_xon \gset
33
\echo '\033[1;35mMenu:\033[0m'
44
\echo ' 1 – Basic Node Information (master/replica, lag, DB size, tmp files)'
55
\echo ' 2 – General Table Size Information'

0 commit comments

Comments
 (0)