Re: BUG #6300: duplicate key value violates unique constraint - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: BUG #6300: duplicate key value violates unique constraint
Date
Msg-id 1322171712.20912.26.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: BUG #6300: duplicate key value violates unique constraint  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
On tor, 2011-11-24 at 11:14 -0500, Robert Haas wrote:
> So I would propose to steer clear of the word "internal", because the
> really scary errors typically are not internal to PostgreSQL at all.
> What I think we want to distinguish between is things that are
> PEBKAC/GIGO, and everything else.  In other words, if a particular
> error message can be caused by typing something stupid, unexpected,
> erroneous, or whatever into psql, it's just an error.  But if no
> input, however misguided, should ever cause that symptom, then it's, I
> don't know what the terminology should be, say, a "severe error".

The current error levels are designed entirely in terms of the client
session behavior, that is,

warning -- things continue
error -- abort transaction
fatal -- abort session
panic -- abort everything

(more or less).  For a client issuing statements and reading responses,
these levels make perfect sense.

What we need is a labeling system in terms of server behavior, which is
completely separate from these client levels.  In principle, every
log-issuing statement (that is, ereport) should specify a client and a
server severity level.

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: libpq in android
Next
From: Peter Eisentraut
Date:
Subject: Re: libpq in android