add some errhint for regexp* functions.

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: add some errhint for regexp* functions.
Date: 2025-12-09 05:21:51
Message-ID: CACJufxHfaEG2QoOHdtGvKy+G+h0Eb7jPT=77Kb0faSsFhZVsTQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

Some of the regexp* function error messages seem not very helpful, I think.
like:
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": %d",
"start", start));

so I added a errhint, errhint would be better than refactoring existing errmsg.
for the above example, I've add:

+ errhint("\"%s\" must be an integer value greater than zero", "start")));

--
jian
https://www.enterprisedb.com

Attachment Content-Type Size
v1-0001-regex-function-add-errhint.patch text/x-patch 7.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-12-09 05:23:56 Re: [Proposal] Adding callback support for custom statistics kinds
Previous Message Kirk Wolak 2025-12-09 05:08:58 Re: [Patch] Add WHERE clause support to REFRESH MATERIALIZED VIEW