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

From Tom Lane
Subject Re: how set GUC_check_errhint_string in call_string_check_hook()
Date
Msg-id 17906.1392320718@sss.pgh.pa.us
Whole thread Raw
In response to Re: how set GUC_check_errhint_string in call_string_check_hook()  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
Amit Langote <amitlangote09@gmail.com> writes:
> On Thu, Feb 13, 2014 at 5:59 PM, amul sul <sul_amul@yahoo.co.in> wrote:
>> 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.

You should use the macro GUC_check_errhint() to set up a hint inside
a GUC variable's check function.  See check_XactIsoLevel() in
src/backend/commands/variable.c for examples.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: truncating pg_multixact/members
Next
From: Tom Lane
Date:
Subject: Re: Recovery inconsistencies, standby much larger than primary