If an error message shows up in the PostgreSQL log, what program is malfunctioning? It's easy to conclude that the answer is PostgreSQL, but that's too simplistic.
For example, suppose these messages show up in my log file:
ERROR: new row for relation "orders" violates check constraint "orders_d_check"
DETAIL: Failing row contains (1975-03-16, 42).
STATEMENT: insert into orders values ('1975-03-16', 42);