Re: verbose mode for pg_input_error_message?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: verbose mode for pg_input_error_message?
Дата
Msg-id 4b418e31-f95a-1d3b-737e-93ba46cf4f8e@dunslane.net
обсуждение исходный текст
Ответ на Re: verbose mode for pg_input_error_message?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: verbose mode for pg_input_error_message?  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On 2023-01-02 Mo 10:44, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> I've been wondering if it might be a good idea to have a third parameter
>> for pg_input_error_message() which would default to false, but which if
>> true would cause it to emit the detail and hint fields, if any, as well
>> as the message field from the error_data.
> 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.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: meson oddities
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Add a test to ldapbindpasswd