| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: add some errhint for regexp* functions. |
| Date: | 2025-12-09 05:33:20 |
| Message-ID: | 16022.1765258400@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
jian he <jian(dot)universality(at)gmail(dot)com> writes:
> 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")));
There are probably hundreds of other places where the ereport
doesn't provide such detail, and I don't see that this adds
much. If you don't understand why a negative value isn't OK,
you still need to go RTFM.
(This message doesn't follow our style guidelines, either.)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2025-12-09 05:34:02 | Re: Fix LOCK_TIMEOUT handling in slotsync worker |
| Previous Message | tushar | 2025-12-09 05:32:51 | Re: pg_dump:qemu: uncaught target signal 7 (Bus error) - core dumped |