From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
Subject: | Re: error messages in extended statistics |
Date: | 2019-05-03 16:21:36 |
Message-ID: | 10879.1556900496@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Error reporting in extended statistics is inconsistent -- many messages
> that are ereport() in mvdistinct.c are elog() in the other modules.
> ...
> I think this should be cleaned up, while at the same time not giving too
> much hassle for translators; for example, this message
> dependencies.c: elog(ERROR, "invalid MVDependencies size %zd (expected at least %zd)",
> should not only be turned into an ereport(), but also the MVDependencies
> part turned into a %s. (Alternatively, we could decide I was wrong and
> turn them all back into elogs, but I obviously vote against that.)
FWIW, I'd vote the other way: that seems like a clear "internal error",
so making translators deal with it is just make-work. It should be an
elog. If there's a reasonably plausible way for a user to trigger an
error condition, then yes ereport, but if we're reporting situations
that couldn't happen without a server bug then elog seems fine.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2019-05-03 17:01:38 | Re: Per-tablespace autovacuum settings |
Previous Message | Alvaro Herrera | 2019-05-03 15:44:04 | error messages in extended statistics |