Skip site navigation (1) Skip section navigation (2)

pgsql: Improve consistency of error reporting in GUC assign_hook

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve consistency of error reporting in GUC assign_hook
Date: 2007-12-28 00:23:24
Message-ID: 20071228002324.168AC7540F0@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Improve consistency of error reporting in GUC assign_hook routines.  Some
were reporting ERROR for interactive assignments and LOG for other cases,
some were saying nothing for non-interactive cases, and a few did yet other
things.  Make them use a new function GUC_complaint_elevel() to establish
a reasonably uniform policy about how to report.  There are still a few
edge cases such as assign_search_path(), but it's much better than before.
Per gripe from Devrim Gunduz and subsequent discussion.

As noted by Alvaro, it'd be better to fold these custom messages into the
standard "invalid parameter value" complaint from guc.c, perhaps as the DETAIL
field.  However that will require more redesign than seems prudent for 8.3.
This is a relatively safe, low-impact change that we can afford to risk now.

Modified Files:
--------------
    pgsql/src/backend/commands:
        tablespace.c (r1.51 -> r1.52)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablespace.c?r1=1.51&r2=1.52)
        variable.c (r1.122 -> r1.123)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/variable.c?r1=1.122&r2=1.123)
    pgsql/src/backend/tcop:
        postgres.c (r1.539 -> r1.540)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.539&r2=1.540)
    pgsql/src/backend/utils/misc:
        README (r1.7 -> r1.8)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/README?r1=1.7&r2=1.8)
        guc.c (r1.427 -> r1.428)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.427&r2=1.428)
    pgsql/src/include/utils:
        guc.h (r1.88 -> r1.89)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc.h?r1=1.88&r2=1.89)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2007-12-28 11:13:55
Subject: pgsql: Update required TeX settings
Previous:From: Tom LaneDate: 2007-12-27 18:28:58
Subject: pgsql: Disallow digits and lower-case ASCII letters as the delimiter in

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group