Re: how set GUC_check_errhint_string in call_string_check_hook() - Mailing list pgsql-hackers

From Amit Langote
Subject Re: how set GUC_check_errhint_string in call_string_check_hook()
Date
Msg-id CA+HiwqGfepfZ0mDi2mdBVSws0pDhqZ5_XPkT=CVL_rrEFZg0uw@mail.gmail.com
Whole thread Raw
In response to how set GUC_check_errhint_string in call_string_check_hook()  (amul sul <sul_amul@yahoo.co.in>)
Responses Re: how set GUC_check_errhint_string in call_string_check_hook()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Amul,

On Thu, Feb 13, 2014 at 5:59 PM, amul sul <sul_amul@yahoo.co.in> wrote:

> I have basic questions,
>
> 1. Condition testing of  GUC_check_errdetail_string or other GUC_*  is
> needed, even if we resting it?

A few lines before this conditional test, there is a call to the hook
function (using the check_hook function pointer) as follows which
might set these variables:

if (!(*conf->check_hook) (newval, extra, source))


> 2. Can I pass hint message in above ereport(), how?
>

It could be done by setting the check hook related global variable
"GUC_check_errhint_string" inside your hook function.

--
Amit



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [BUG] Archive recovery failure on 9.3+.
Next
From: Greg Stark
Date:
Subject: Re: Recovery inconsistencies, standby much larger than primary