=?UTF-8?Q?Beno=C3=AEt_Dufour?= <benoit.dufour@mail.com> writes:
> It recalculates the strlen of the error message.
> This is a bad behaviour for softwares that need to execute quickly.
If you're concerned about the cost of a strlen() in an error-handling
path, you've got your priorities wrong. Not having gotten an error
in the first place is always going to be preferable. Moreover, the
cost of that strlen() is utterly negligible in comparison to the work
the server did to detect and report the error (to say nothing of
possible network transmission costs).
regards, tom lane