| From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | Brian Brennglass <brian(at)supabase(dot)io> |
| Cc: | pgsql-docs(at)postgresql(dot)org |
| Subject: | Re: [PATCH] doc: outline all planner nodes |
| Date: | 2026-08-01 03:04:04 |
| Message-ID: | CAApHDvpsHPLpJNEx9SP+2RHgPhQoqV+7e1dyoYcgprE73A5kFA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Sat, 1 Aug 2026 at 01:20, Brian Brennglass <brian(at)supabase(dot)io> wrote:
> Just as an aside, I am kind of curious why PG uses decimals to track rows. Is it now possible to return half a row?
It isn't. What the actual rows mean is the total rows returned divided
by the "loops" count. If loop 1 returns 2 rows and loop 2 gives you 3,
then that's 2.50 rows on average. Prior to that change, we'd have only
displayed "rows=2". For smaller average row counts, rounding down is
quite misleading, especially so when the average was below "1.0",
since we would have displayed "rows=0". The extra precision was added
to make that problem 100 times less bad.
More details and links to mailing list discussion in [1].
David
[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=ddb17e387
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Tom Lane | 2026-08-01 02:58:41 | Re: Shadowing type names because I am not smart |