git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 690ed2b) | patch
Fix a number of places that produced XX000 errors in the regression tests.
Mon, 3 Aug 2015 03:49:19 +0000 (23:49 -0400)
Mon, 3 Aug 2015 03:49:19 +0000 (23:49 -0400)
commit 09cecdf285ea9f51aed669f9ea1ba840197d49d0
Fix a number of places that produced XX000 errors in the regression tests.

It's against project policy to use elog() for user-facing errors, or to
omit an errcode() selection for errors that aren't supposed to be "can't
happen" cases. Fix all the violations of this policy that result in
ERRCODE_INTERNAL_ERROR log entries during the standard regression tests,
as errors that can reliably be triggered from SQL surely should be
considered user-facing.

I also looked through all the files touched by this commit and fixed
other nearby problems of the same ilk. I do not claim to have fixed
all violations of the policy, just the ones in these files.

In a few places I also changed existing ERRCODE choices that didn't
seem particularly appropriate; mainly replacing ERRCODE_SYNTAX_ERROR
by something more specific.

Back-patch to 9.5, but no further; changing ERRCODE assignments in
stable branches doesn't seem like a good idea.
13 files changed:
contrib/tablefunc/tablefunc.c diff | blob | blame | history
src/backend/access/common/reloptions.c diff | blob | blame | history
src/backend/access/heap/heapam.c diff | blob | blame | history
src/backend/commands/copy.c diff | blob | blame | history
src/backend/commands/vacuum.c diff | blob | blame | history
src/backend/executor/execQual.c diff | blob | blame | history
src/backend/utils/adt/txid.c diff | blob | blame | history
src/pl/plperl/plperl.c diff | blob | blame | history
src/pl/plpython/plpy_elog.c diff | blob | blame | history
src/pl/plpython/plpy_exec.c diff | blob | blame | history
src/pl/tcl/pltcl.c diff | blob | blame | history
src/test/regress/expected/txid.out diff | blob | blame | history
src/test/regress/regress.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /