From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: NOTICE vs WARNING |
Date: | 2003-09-02 21:58:50 |
Message-ID: | Pine.LNX.4.44.0309022348570.1038-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane writes:
> I would say that NOTICEs are things that are routine in certain
> contexts. We would not bother with the NOTICE at all if we thought
> it held no interest, but often it doesn't have any.
>
> Ignored syntax clauses probably ought to be WARNINGs, since the message
> is telling you that what you asked for isn't going to be done. The
> other examples you give seem appropriate as NOTICEs. In particular,
> the notices about changing "opaque" types to something else are a
> routine occurrence in upgrading old schemas, and so I think it's
> reasonable for them to be NOTICEs.
My gut feeling was that of all things the messages about changing the
opaque types should be warnings, because the effect of the command isn't
exactly what you entered. A counterexample would be the notice about the
creation of a sequence for serial, because in that case the effect of the
command is exactly what you entered.
I don't think the "routine occurrence" criterion scales well, because if
you enter garbage, a syntax error is also a routine occurrence.
In fact, I like the criterion that a warning should be raised rather than
a notice if the effect of the command deviates from what the command
actually says. That puts the messages for serials, primary keys, drop
cascades clearly into notices, messages about missing, implicitly added,
or changed syntax clauses into warnings.
I don't think the dump reload scenario is particularly important. After
all, psql or pg_restore don't act differently upon notice or warning, it's
just something that the user reads.
--
Peter Eisentraut peter_e(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2003-09-02 22:12:48 | Re: Win32 native port |
Previous Message | Bruce Momjian | 2003-09-02 21:35:51 | Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...) |