Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit 1114d77

Browse files
committed
f004: pg12 support fixed
Support of PG 12 was realized not fully. It is fixed.
2 parents 74ad99f + 7845154 commit 1114d77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/checks/F004_heap_bloat.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ with data as (
3333
+ case when bool_or(att.attname = 'oid' and att.attnum < 0) then 4 else 0 end as tpl_hdr_size,
3434
sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 0) ) as tpl_data_size,
3535
36-
bool_or(att.atttypid = 'pg_catalog.name'::regtype) or count(att.attname) <> count(s.attname) as is_na
36+
bool_or(att.atttypid = 'pg_catalog.name'::regtype) or
37+
sum(case when att.attnum > 0 then 1 else 0 end) <> count(s.attname) as is_na
3738
from pg_attribute as att
3839
join pg_class as tbl on att.attrelid = tbl.oid and tbl.relkind = 'r'
3940
join pg_namespace as ns on ns.oid = tbl.relnamespace

0 commit comments

Comments
 (0)