Commit cc6cbd0
committed
fix(driver/postgres): clamp reltuples -1 to 0 in inspect output
A table that has never been ANALYZEd reports reltuples = -1; surfacing that
as a negative row estimate in 'siphon inspect' reads as a bug. GREATEST(...,0)
clamps it to 0 (the conventional 'unknown/0' shown by pg tooling) while real
counts pass through unchanged. Query structure (and the s. alias fix for the
relname ambiguity) is otherwise unchanged — the 'simplify' half of the review
note is intentionally not taken, to avoid regressing the just-fixed SQL.1 parent 56aaa9a commit cc6cbd0
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
0 commit comments