postgresql/src/bin/psql
Tom Lane 0426f349ef Rearrange the handling of error context reports.
Remove the code in plpgsql that suppressed the innermost line of CONTEXT
for messages emitted by RAISE commands.  That was never more than a quick
backwards-compatibility hack, and it's pretty silly in cases where the
RAISE is nested in several levels of function.  What's more, it violated
our design theory that verbosity of error reports should be controlled
on the client side not the server side.

To alleviate the resulting noise increase, introduce a feature in libpq
and psql whereby the CONTEXT field of messages can be suppressed, either
always or only for non-error messages.  Printing CONTEXT for errors only
is now their default behavior.

The actual code changes here are pretty small, but the effects on the
regression test outputs are widespread.  I had to edit some of the
alternative expected outputs by hand; hopefully the buildfarm will soon
find anything I fat-fingered.

In passing, fix up (again) the output line counts in psql's various
help displays.  Add some commentary about how to verify them.

Pavel Stehule, reviewed by Petr Jelínek, Jeevan Chalke, and others
2015-09-05 11:58:33 -04:00
..
po Translation updates 2015-06-28 23:56:55 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
command.c Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
command.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
common.c pgindent run for 9.5 2015-05-23 21:35:49 -04:00
common.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
copy.c pgindent run for 9.5 2015-05-23 21:35:49 -04:00
copy.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
create_help.pl Update copyright for 2015 2015-01-06 11:43:47 -05:00
describe.c Fix psql \d output of policies. 2015-08-03 09:07:47 -07:00
describe.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
help.c Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
help.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
input.c Add a pager_min_lines setting to psql 2015-03-28 11:07:41 -04:00
input.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
large_obj.c Tweak __attribute__-wrapping macros for better pgindent results. 2015-03-26 14:03:25 -04:00
large_obj.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
mainloop.c Fix documentation of psql's ECHO all mode. 2015-01-31 18:35:13 -05:00
mainloop.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
mbprint.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
mbprint.h Fix indentation of \d footers for non-ASCII cases. 2012-03-07 19:25:59 -05:00
nls.mk Add missing source files to nls.mk 2014-07-15 10:10:42 -04:00
print.c pgindent run for 9.5 2015-05-23 21:35:49 -04:00
print.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
prompt.c Add psql PROMPT variable showing the pid of the connected to backend. 2015-07-07 13:40:44 +02:00
prompt.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
psqlrc.sample Improve FILES section of psql reference page. 2014-01-14 19:27:57 -05:00
psqlscan.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
psqlscan.l Remove a couple other vestigial yylex() declarations. 2015-03-29 13:12:28 -04:00
settings.h Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
startup.c Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
stringutils.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
stringutils.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
tab-complete.c Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
tab-complete.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
variables.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
variables.h Update copyright for 2015 2015-01-06 11:43:47 -05:00