Alvaro Herrera wrote:
> errmsg("cannot assign to field \"%s\" of column \"%s\" because its
> type %s is not a composite type")
>
> What do you think of changing those to use errdetail in addition to
> errmsg? So this particular example would become something like
>
> errmsg("cannot assign to field \"%s\" of column \"%s\"),
> errdetail("Its type %s is not a composite type.")
The style guidelines state that an error message should include the
reason for the error. That is fully intentional, and I would consider
the above to be a step backward.
In fact, every use of %m would fall into your bunch as well. We only
write "could not open file: %m" instead of "could not open file because
%m" for grammatical reasons. I don't think splitting out the %m would
be an improvement.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/