Re: how set GUC_check_errhint_string in call_string_check_hook()

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: amul sul <sul_amul(at)yahoo(dot)co(dot)in>
Cc: Postgre SQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how set GUC_check_errhint_string in call_string_check_hook()
Date: 2014-02-13 09:47:35
Message-ID: CA+HiwqGfepfZ0mDi2mdBVSws0pDhqZ5_XPkT=CVL_rrEFZg0uw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amul,

On Thu, Feb 13, 2014 at 5:59 PM, amul sul <sul_amul(at)yahoo(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-02-13 09:59:48 Re: Recovery inconsistencies, standby much larger than primary
Previous Message Heikki Linnakangas 2014-02-13 09:46:16 Re: [BUG] Archive recovery failure on 9.3+.