"Tom Lane" <tgl@sss.pgh.pa.us> writes:
>
> That's a contrived example (and if I believed it, I would think that the
> right answer is to emit no errcontext if the elevel is less than ERROR).
>
Yes, I've thought about ignore errcontext by considering elevel. But I
scratched the source code for other uses of errcontext, and I found seems
all of them understand that errcontext will be called unconditionally. For
example, buffer_write_error_callback(), it doesn't say "error in writing
block ..." but says "writing block ...". So I think this place is not
consistent with others - it just says "invalid ... ", and should be changed.
Regards,
Qingqing