Re: how set GUC_check_errhint_string in call_string_check_hook()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: amul sul <sul_amul(at)yahoo(dot)co(dot)in>, 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 19:45:18
Message-ID: 17906.1392320718@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-02-13 19:52:10 Re: Recovery inconsistencies, standby much larger than primary
Previous Message Alvaro Herrera 2014-02-13 19:37:02 Re: truncating pg_multixact/members