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

From amul sul
Subject how set GUC_check_errhint_string in call_string_check_hook()
Date
Msg-id 1392281979.62453.YahooMailNeo@web193502.mail.sg3.yahoo.com
Whole thread Raw
Responses Re: how set GUC_check_errhint_string in call_string_check_hook()  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
Dear all,

I need help to send hint message to erreport()  i call_string_check_hook function [src/backend/utils/misc/guc.c:8092]

In   call_string_check_hook(), following parameter are resets

  /* Reset variables that might be set by hook */
8100         GUC_check_errcode_value = ERRCODE_INVALID_PARAMETER_VALUE;
8101         GUC_check_errmsg_string = NULL;
8102         GUC_check_errdetail_string = NULL;
8103         GUC_check_errhint_string = NULL;

at line 8107 in ereport() it has conditional operation as

8113 GUC_check_errdetail_string ?
8114                                  errdetail_internal("%s", GUC_check_errdetail_string) : 0,

I have basic questions,
 
1. Condition testing of  GUC_check_errdetail_string or other GUC_*  is needed, even if we resting it?
2. Can I pass hint message in above ereport(), how?

Thanks in advance !

Regards,
Amul Sul

pgsql-hackers by date:

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