From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix a number of places that produced XX000 errors in the regress
Date: Mon, 03 Aug 2015 03:49:25 +0000
Message-ID: <E1ZM6kf-0007PO-Rf@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/09cecdf285ea9f51aed669f9ea1ba840197d49d0
Modified Files
--------------
contrib/tablefunc/tablefunc.c | 40 +++++++++++-------
src/backend/access/common/reloptions.c | 19 +++++----
src/backend/access/heap/heapam.c | 8 +++-
src/backend/commands/copy.c | 32 ++++++++++-----
src/backend/commands/vacuum.c | 5 ++-
src/backend/executor/execQual.c | 6 ++-
src/backend/utils/adt/txid.c | 13 ++++--
src/pl/plperl/plperl.c | 70 +++++++++++++++++++++-----------
src/pl/plpython/plpy_elog.c | 2 +-
src/pl/plpython/plpy_exec.c | 12 ++++--
src/pl/tcl/pltcl.c | 51 +++++++++++++++--------
src/test/regress/expected/txid.out | 10 ++---
src/test/regress/regress.c | 6 ++-
13 files changed, 181 insertions(+), 93 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix a number of places that produced XX000 errors in the regress
In-Reply-To: <E1ZM6kf-0007PO-Rf@gemulon.postgresql.org>
References: <E1ZM6kf-0007PO-Rf@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox