*** a/src/interfaces/libpq/fe-protocol3.c
--- b/src/interfaces/libpq/fe-protocol3.c
***************
*** 914,922 **** pqGetErrorNotice3(PGconn *conn, bool isError)
  		val = PQresultErrorField(res, PG_DIAG_INTERNAL_QUERY);
  		if (val)
  			appendPQExpBuffer(&workBuf, libpq_gettext("QUERY:  %s\n"), val);
! 		val = PQresultErrorField(res, PG_DIAG_CONTEXT);
! 		if (val)
! 			appendPQExpBuffer(&workBuf, libpq_gettext("CONTEXT:  %s\n"), val);
  	}
  	if (conn->verbosity == PQERRORS_VERBOSE)
  	{
--- 914,926 ----
  		val = PQresultErrorField(res, PG_DIAG_INTERNAL_QUERY);
  		if (val)
  			appendPQExpBuffer(&workBuf, libpq_gettext("QUERY:  %s\n"), val);
! 
! 		if (isError || conn->verbosity == PQERRORS_VERBOSE)
! 		{
! 			val = PQresultErrorField(res, PG_DIAG_CONTEXT);
! 			if (val)
! 				appendPQExpBuffer(&workBuf, libpq_gettext("CONTEXT:  %s\n"), val);
! 		}
  	}
  	if (conn->verbosity == PQERRORS_VERBOSE)
  	{
*** a/src/pl/plpgsql/src/pl_exec.c
--- b/src/pl/plpgsql/src/pl_exec.c
***************
*** 39,46 ****
  #include "utils/typcache.h"
  
  
- static const char *const raise_skip_msg = "RAISE";
- 
  typedef struct
  {
  	int			nargs;			/* number of arguments */
--- 39,44 ----
***************
*** 868,875 **** plpgsql_exec_error_callback(void *arg)
  	PLpgSQL_execstate *estate = (PLpgSQL_execstate *) arg;
  
  	/* if we are doing RAISE, don't report its location */
- 	if (estate->err_text == raise_skip_msg)
- 		return;
  
  	if (estate->err_text != NULL)
  	{
--- 866,871 ----
***************
*** 3032,3038 **** exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
  	/*
  	 * Throw the error (may or may not come back)
  	 */
- 	estate->err_text = raise_skip_msg;	/* suppress traceback of raise */
  
  	ereport(stmt->elog_level,
  			(err_code ? errcode(err_code) : 0,
--- 3028,3033 ----
