Return NULL for unknown pgstattuple estimate pgstattuple_approx() returns 0 when there is not enough information to estimate the number of live tuples, making an unknown estimate indistinguishable from an estimate of an empty table.
Return NULL for approx_tuple_count instead Suggested-by: Lukas Fittl <[email protected]> Discussion: https://postgr.es/m/CAP53PkzhhC4yQtmBLGHz41-Bs3ZqtQdtYGjxMh_xcTK6Z7eU9Q%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b443bc7406fd92f1f869cc700810ef9a17a01d82 Modified Files -------------- contrib/pgstattuple/expected/pgstattuple.out | 4 ++-- contrib/pgstattuple/pgstatapprox.c | 10 +++++++--- contrib/pgstattuple/sql/pgstattuple.sql | 2 +- doc/src/sgml/pgstattuple.sgml | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-)
