On 2025-Jul-28, Tom Lane wrote:

> 2b. As 2a except the two functions are pgfdw_report_error()
> and pgfdw_report_warning(), both with hard-wired elevel values.
> This'd be sufficient right now, but it's plausible that this path
> would lead to needing pgfdw_report_log() and some other variants
> in future.

Hmm, what about 2c. having pgfdw_report_error() with hardcoded elevel,
but complement it with pgfdw_report() that takes the elevel as argument,
asserting that it's less than ERROR?  Then the calls look like
  pgfdw_report(WARNING, "doo dee");

which makes sense IMO and we don't have to worry about the future.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"La experiencia nos dice que el hombre peló millones de veces las patatas,
pero era forzoso admitir la posibilidad de que en un caso entre millones,
las patatas pelarían al hombre" (Ijon Tichy)


Reply via email to