Remove error message hints mentioning configure options

Started by Peter Eisentrautabout 4 years ago4 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

We have some error messages like this:

SELECT xml_is_well_formed('<abc/>');
ERROR: unsupported XML feature
DETAIL: This functionality requires the server to be built with libxml
support.
HINT: You need to rebuild PostgreSQL using --with-libxml.

This patch removes these kinds of hints.

I think these hints are usually not useful since users will use packaged
distributions and won't be interested in rebuilding their installation
from source. Also, we have only used these kinds of hints for some
features and in some places, not consistently throughout. And of course
there are build systems that don't use configure. The information
"needs to be built with XXX" or "was not built with XXX" should be
enough for those interested in actually changing their build
configuration to figure out what to do.

Attachments:

0001-Remove-error-message-hints-mentioning-configure-opti.patchtext/plain; charset=UTF-8; name=0001-Remove-error-message-hints-mentioning-configure-opti.patchDownload+4-208
#2Andres Freund
andres@anarazel.de
In reply to: Peter Eisentraut (#1)
Re: Remove error message hints mentioning configure options

Jo.

On 2022-04-07 09:19:14 +0200, Peter Eisentraut wrote:

I think these hints are usually not useful since users will use packaged
distributions and won't be interested in rebuilding their installation from
source. Also, we have only used these kinds of hints for some features and
in some places, not consistently throughout. And of course there are build
systems that don't use configure. The information "needs to be built with
XXX" or "was not built with XXX" should be enough for those interested in
actually changing their build configuration to figure out what to do.

+1

diff --git a/src/test/regress/expected/compression_1.out b/src/test/regress/expected/compression_1.out
index 1ce2962d55..c0a47646eb 100644
--- a/src/test/regress/expected/compression_1.out
+++ b/src/test/regress/expected/compression_1.out

The xml stuff is at least old, but compression_1 isn't. I think we've tried to
avoid long alternative output files where everything fails due to being
unsupported for a while now? Robert, Dilip? See uses of :skip_test in various
tests.

Greetings,

Andres Freund

#3Daniel Gustafsson
daniel@yesql.se
In reply to: Peter Eisentraut (#1)
Re: Remove error message hints mentioning configure options

On 7 Apr 2022, at 09:19, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:

We have some error messages like this:

SELECT xml_is_well_formed('<abc/>');
ERROR: unsupported XML feature
DETAIL: This functionality requires the server to be built with libxml support.
HINT: You need to rebuild PostgreSQL using --with-libxml.

This patch removes these kinds of hints.

I think these hints are usually not useful since users will use packaged distributions and won't be interested in rebuilding their installation from source.

Agreed, +1 on this patch. Grepping the code I was also unable to find any
other user-facing instances.

--
Daniel Gustafsson https://vmware.com/

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#2)
Re: Remove error message hints mentioning configure options

Andres Freund <andres@anarazel.de> writes:

On 2022-04-07 09:19:14 +0200, Peter Eisentraut wrote:

I think these hints are usually not useful since users will use packaged
distributions and won't be interested in rebuilding their installation from
source.

+1

+1, those hints are from another era.

The xml stuff is at least old, but compression_1 isn't. I think we've tried to
avoid long alternative output files where everything fails due to being
unsupported for a while now? Robert, Dilip? See uses of :skip_test in various
tests.

Agreed, we have a better technology now for stub test results. Come
to think of it, xml.sql really ought to be redone along the same lines.

regards, tom lane