Re: Question -- why is there no errhint_internal function? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Question -- why is there no errhint_internal function?
Date
Msg-id 547688.1738630459@sss.pgh.pa.us
Whole thread Raw
In response to Question -- why is there no errhint_internal function?  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
Peter Smith <smithpb2250@gmail.com> writes:
> I noticed today that there is no 'errhint_internal' function partner
> for the 'errhint' function.

> Now, it might seem that hints are always intended for user output so
> of course, you'll always want them translated...

Yeah, I think that was the reasoning.  If it needs a hint it must be
a user-facing error.

> but there are some
> calls to this function (like below) where the actual hint message is
> already built and translated before %s parameter substitution, so
> AFAICT translation aka gettext lookup of just a "%s" format string
> doesn't really achieve anything.

There are lots of places where we don't worry about that overhead.
I'm not excited about trying to get rid of it everywhere --- surely
these paths are not very performance-critical?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Better title output for psql \dt \di etc. commands
Next
From: Tom Lane
Date:
Subject: Re: Better title output for psql \dt \di etc. commands