Re: verbose mode for pg_input_error_message?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: verbose mode for pg_input_error_message?
Date: 2023-02-26 01:07:33
Message-ID: 1441887.1677373653@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> On Sat, Feb 25, 2023 at 01:39:21PM +0900, Michael Paquier wrote:
>> pg_input_error_message() does not strike me as a good function name,
>> though, because it now returns much more than an error message.
>> Hence, couldn't something like pg_input_error() be better, because
>> more generic?

> I personally think the existing name is fine. It returns the error
> message, which includes the primary, detail, and hint messages. Also, I'm
> not sure that pg_input_error() is descriptive enough. That being said, I'm
> happy to run the sed command to change the name to whatever folks think is
> best.

Maybe pg_input_error_info()? I tend to agree with Michael that as
soon as you throw things like the SQLSTATE code into it, "message"
seems not very apropos. I'm not dead set on that position, though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2023-02-26 01:13:57 Re: MERGE ... WHEN NOT MATCHED BY SOURCE
Previous Message Nathan Bossart 2023-02-25 23:29:19 Re: verbose mode for pg_input_error_message?