Re: verbose mode for pg_input_error_message? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: verbose mode for pg_input_error_message?
Date
Msg-id 1430967.1672674282@sss.pgh.pa.us
Whole thread Raw
In response to verbose mode for pg_input_error_message?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: verbose mode for pg_input_error_message?
List pgsql-hackers
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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Allow placeholders in ALTER ROLE w/o superuser
Next
From: Tom Lane
Date:
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions