agora inbox for pgsql-hackers@postgresql.orghelp / color / mirror / Atom feed
[PATCH 6/6] Fix double quoting in extended statistics error message 2+ messages / 1 participants [nested] [flat]
* [PATCH 6/6] Fix double quoting in extended statistics error message @ 2026-02-09 07:16 Kyotaro Horiguchi <horikyota.ntt@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Kyotaro Horiguchi @ 2026-02-09 07:16 UTC (permalink / raw) Remove extra quoting for identifiers already quoted by quote_identifier(). --- src/backend/statistics/extended_stats_funcs.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c index b640941a9cc..c718ffa95c6 100644 --- a/src/backend/statistics/extended_stats_funcs.c +++ b/src/backend/statistics/extended_stats_funcs.c @@ -347,7 +347,7 @@ extended_statistics_update(FunctionCallInfo fcinfo) { ereport(WARNING, errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find extended statistics object \"%s\".\"%s\"", + errmsg("could not find extended statistics object %s.%s", quote_identifier(nspname), quote_identifier(stxname))); success = false; @@ -420,7 +420,7 @@ extended_statistics_update(FunctionCallInfo fcinfo) errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("cannot specify parameter \"%s\"", extarginfo[NDISTINCT_ARG].argname), - errhint("Extended statistics object \"%s\".\"%s\" does not support statistics of this type.", + errhint("Extended statistics object %s.%s does not support statistics of this type.", quote_identifier(nspname), quote_identifier(stxname))); @@ -904,9 +904,11 @@ pg_clear_extended_stats(PG_FUNCTION_ARGS) table_close(pg_stext, RowExclusiveLock); ereport(WARNING, errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not clear extended statistics object \"%s\".\"%s\": incorrect relation \"%s\".\"%s\" specified", - get_namespace_name(nspoid), stxname, - relnspname, relname)); + errmsg("could not clear extended statistics object %s.%s: incorrect relation %s.%s specified", + quote_identifier(get_namespace_name(nspoid)), + quote_identifier(stxname), + quote_identifier(relnspname), + quote_identifier(relname))); PG_RETURN_VOID(); } -- 2.47.3 ----Next_Part(Tue_Feb_10_14_37_52_2026_180)---- ^ permalink raw reply [nested|flat] 2+ messages in thread
* [PATCH 6/6] Fix double quoting in extended statistics error message @ 2026-02-09 07:16 Kyotaro Horiguchi <horikyota.ntt@gmail.com> 0 siblings, 0 replies; 2+ messages in thread From: Kyotaro Horiguchi @ 2026-02-09 07:16 UTC (permalink / raw) Remove extra quoting for identifiers already quoted by quote_identifier(). --- src/backend/statistics/extended_stats_funcs.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/backend/statistics/extended_stats_funcs.c b/src/backend/statistics/extended_stats_funcs.c index b640941a9cc..c718ffa95c6 100644 --- a/src/backend/statistics/extended_stats_funcs.c +++ b/src/backend/statistics/extended_stats_funcs.c @@ -347,7 +347,7 @@ extended_statistics_update(FunctionCallInfo fcinfo) { ereport(WARNING, errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find extended statistics object \"%s\".\"%s\"", + errmsg("could not find extended statistics object %s.%s", quote_identifier(nspname), quote_identifier(stxname))); success = false; @@ -420,7 +420,7 @@ extended_statistics_update(FunctionCallInfo fcinfo) errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("cannot specify parameter \"%s\"", extarginfo[NDISTINCT_ARG].argname), - errhint("Extended statistics object \"%s\".\"%s\" does not support statistics of this type.", + errhint("Extended statistics object %s.%s does not support statistics of this type.", quote_identifier(nspname), quote_identifier(stxname))); @@ -904,9 +904,11 @@ pg_clear_extended_stats(PG_FUNCTION_ARGS) table_close(pg_stext, RowExclusiveLock); ereport(WARNING, errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("could not clear extended statistics object \"%s\".\"%s\": incorrect relation \"%s\".\"%s\" specified", - get_namespace_name(nspoid), stxname, - relnspname, relname)); + errmsg("could not clear extended statistics object %s.%s: incorrect relation %s.%s specified", + quote_identifier(get_namespace_name(nspoid)), + quote_identifier(stxname), + quote_identifier(relnspname), + quote_identifier(relname))); PG_RETURN_VOID(); } -- 2.47.3 ----Next_Part(Tue_Feb_10_14_37_52_2026_180)---- ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-02-09 07:16 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-02-09 07:16 [PATCH 6/6] Fix double quoting in extended statistics error message Kyotaro Horiguchi <horikyota.ntt@gmail.com> 2026-02-09 07:16 [PATCH 6/6] Fix double quoting in extended statistics error message Kyotaro Horiguchi <horikyota.ntt@gmail.com>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox