]> granicus.if.org Git - postgresql/commit
Make error logging in extended statistics more consistent
authorTomas Vondra <tomas.vondra@postgresql.org>
Thu, 30 May 2019 14:16:12 +0000 (16:16 +0200)
committerTomas Vondra <tomas.vondra@postgresql.org>
Thu, 30 May 2019 15:03:36 +0000 (17:03 +0200)
commitfe415ff10408a1487d5773b47459306476ec58f0
tree9b4d712deb836d52e9c7f3dbd33655d835c60392
parent56b78626c7288fad498c0fae7fe4fd1f240ed13f
Make error logging in extended statistics more consistent

Most errors reported in extended statistics are internal issues, and so
should use elog(). The MCV list code was already following this rule, but
the functional dependencies and ndistinct coefficients were using a mix
of elog() and ereport(). Fix this by changing most places to elog(), with
the exception of input functions.

This is a mostly cosmetic change, it makes the life a little bit easier
for translators, as elog() messages are not translated. So backpatch to
PostgreSQL 10, where extended statistics were introduced.

Author: Tomas Vondra
Backpatch-through: 10 where extended statistics were added
Discussion: https://postgr.es/m/20190503154404.GA7478@alvherre.pgsql
src/backend/statistics/dependencies.c
src/backend/statistics/mvdistinct.c