Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 708007d

Browse files
committed
Remove error message hints mentioning configure options
These 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. Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/2552aed7-d0e9-280a-54aa-2dc7073f371d%40enterprisedb.com
1 parent b3abca6 commit 708007d

File tree

8 files changed

+4
-207
lines changed

8 files changed

+4
-207
lines changed

src/backend/access/common/toast_compression.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ int default_toast_compression = TOAST_PGLZ_COMPRESSION;
3030
ereport(ERROR, \
3131
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
3232
errmsg("compression method lz4 not supported"), \
33-
errdetail("This functionality requires the server to be built with lz4 support."), \
34-
errhint("You need to rebuild PostgreSQL using %s.", "--with-lz4")))
33+
errdetail("This functionality requires the server to be built with lz4 support.")))
3534

3635
/*
3736
* Compress a varlena using PGLZ.

src/backend/libpq/hba.c

-2
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,6 @@ parse_hba_line(TokenizedAuthLine *tok_line, int elevel)
10101010
ereport(elevel,
10111011
(errcode(ERRCODE_CONFIG_FILE_ERROR),
10121012
errmsg("hostssl record cannot match because SSL is not supported by this build"),
1013-
errhint("Compile with --with-ssl to use SSL connections."),
10141013
errcontext("line %d of configuration file \"%s\"",
10151014
line_num, HbaFileName)));
10161015
*err_msg = "hostssl record cannot match because SSL is not supported by this build";
@@ -1023,7 +1022,6 @@ parse_hba_line(TokenizedAuthLine *tok_line, int elevel)
10231022
ereport(elevel,
10241023
(errcode(ERRCODE_CONFIG_FILE_ERROR),
10251024
errmsg("hostgssenc record cannot match because GSSAPI is not supported by this build"),
1026-
errhint("Compile with --with-gssapi to use GSSAPI connections."),
10271025
errcontext("line %d of configuration file \"%s\"",
10281026
line_num, HbaFileName)));
10291027
*err_msg = "hostgssenc record cannot match because GSSAPI is not supported by this build";

src/backend/utils/adt/pg_locale.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -1462,8 +1462,7 @@ make_icu_collator(const char *iculocstr,
14621462
/* could get here if a collation was created by a build with ICU */
14631463
ereport(ERROR,
14641464
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1465-
errmsg("ICU is not supported in this build"), \
1466-
errhint("You need to rebuild PostgreSQL using %s.", "--with-icu")));
1465+
errmsg("ICU is not supported in this build")));
14671466
#endif /* not USE_ICU */
14681467
}
14691468

@@ -2008,8 +2007,7 @@ check_icu_locale(const char *icu_locale)
20082007
#else
20092008
ereport(ERROR,
20102009
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2011-
errmsg("ICU is not supported in this build"), \
2012-
errhint("You need to rebuild PostgreSQL using %s.", "--with-icu")));
2010+
errmsg("ICU is not supported in this build")));
20132011
#endif
20142012
}
20152013

src/backend/utils/adt/xml.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,7 @@ const TableFuncRoutine XmlTableRoutine =
220220
ereport(ERROR, \
221221
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
222222
errmsg("unsupported XML feature"), \
223-
errdetail("This functionality requires the server to be built with libxml support."), \
224-
errhint("You need to rebuild PostgreSQL using %s.", "--with-libxml")))
223+
errdetail("This functionality requires the server to be built with libxml support.")))
225224

226225

227226
/* from SQL/XML:2008 section 4.9 */

src/bin/initdb/initdb.c

-1
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,6 @@ setlocales(void)
22142214
*/
22152215
#ifndef USE_ICU
22162216
pg_log_error("ICU is not supported in this build");
2217-
fprintf(stderr, _("You need to rebuild PostgreSQL using %s.\n"), "--with-icu");
22182217
exit(1);
22192218
#endif
22202219
}

src/test/regress/expected/compression_1.out

-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Indexes:
1616
CREATE TABLE cmdata1(f1 TEXT COMPRESSION lz4);
1717
ERROR: compression method lz4 not supported
1818
DETAIL: This functionality requires the server to be built with lz4 support.
19-
HINT: You need to rebuild PostgreSQL using --with-lz4.
2019
INSERT INTO cmdata1 VALUES(repeat('1234567890', 1004));
2120
ERROR: relation "cmdata1" does not exist
2221
LINE 1: INSERT INTO cmdata1 VALUES(repeat('1234567890', 1004));
@@ -195,7 +194,6 @@ LINE 1: SELECT pg_column_compression(x) FROM compressmv;
195194
CREATE TABLE cmpart(f1 text COMPRESSION lz4) PARTITION BY HASH(f1);
196195
ERROR: compression method lz4 not supported
197196
DETAIL: This functionality requires the server to be built with lz4 support.
198-
HINT: You need to rebuild PostgreSQL using --with-lz4.
199197
CREATE TABLE cmpart1 PARTITION OF cmpart FOR VALUES WITH (MODULUS 2, REMAINDER 0);
200198
ERROR: relation "cmpart" does not exist
201199
CREATE TABLE cmpart2(f1 text COMPRESSION pglz);
@@ -240,7 +238,6 @@ SET default_toast_compression = 'pglz';
240238
ALTER TABLE cmdata ALTER COLUMN f1 SET COMPRESSION lz4;
241239
ERROR: compression method lz4 not supported
242240
DETAIL: This functionality requires the server to be built with lz4 support.
243-
HINT: You need to rebuild PostgreSQL using --with-lz4.
244241
INSERT INTO cmdata VALUES (repeat('123456789', 4004));
245242
\d+ cmdata
246243
Table "public.cmdata"
@@ -274,7 +271,6 @@ ERROR: relation "cmpart1" does not exist
274271
ALTER TABLE cmpart2 ALTER COLUMN f1 SET COMPRESSION lz4;
275272
ERROR: compression method lz4 not supported
276273
DETAIL: This functionality requires the server to be built with lz4 support.
277-
HINT: You need to rebuild PostgreSQL using --with-lz4.
278274
-- new data should be compressed with the current compression method
279275
INSERT INTO cmpart VALUES (repeat('123456789', 1004));
280276
ERROR: relation "cmpart" does not exist
@@ -314,7 +310,6 @@ DROP TABLE cmdata2;
314310
CREATE TABLE cmdata2 (f1 TEXT COMPRESSION pglz, f2 TEXT COMPRESSION lz4);
315311
ERROR: compression method lz4 not supported
316312
DETAIL: This functionality requires the server to be built with lz4 support.
317-
HINT: You need to rebuild PostgreSQL using --with-lz4.
318313
CREATE UNIQUE INDEX idx1 ON cmdata2 ((f1 || f2));
319314
ERROR: relation "cmdata2" does not exist
320315
INSERT INTO cmdata2 VALUES((SELECT array_agg(md5(g::TEXT))::TEXT FROM

0 commit comments

Comments
 (0)