Error Message Style Guide
postgresql.org
postgresql.org
For developers, needs probably revolve around being able to comprehend what logical situation resulted in the unexpected behaviour. Meaning that errors should give some sense of what internal state cause it to appear and where the input that formed this state came from.
(edit: typos)