From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: verbose mode for pg_input_error_message? |
Date: | 2023-01-10 23:41:12 |
Message-ID: | 20230110234112.GA1471581@nathanxps13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 04, 2023 at 04:18:59PM -0500, Andrew Dunstan wrote:
> On 2023-01-02 Mo 10:44, Tom Lane wrote:
>> I don't think that just concatenating those strings would make for a
>> pleasant API. More sensible, perhaps, to have a separate function
>> that returns a record. Or we could redefine the existing function
>> that way, but I suspect that "just the primary error" will be a
>> principal use-case.
>>
>> Being able to get the SQLSTATE is likely to be interesting too.
>
> OK, here's a patch along those lines.
My vote would be to redefine the existing pg_input_error_message() function
to return a record, but I recognize that this would inflate the patch quite
a bit due to all the existing uses in the tests. If this is the only
argument against this approach, I'm happy to help with the patch.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-01-10 23:50:31 | Re: [PATCH] Support % wildcard in extension upgrade filenames |
Previous Message | Justin Pryzby | 2023-01-10 23:26:34 | wal_compression = method:level |