Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id C5D762EBA7C for ; Thu, 24 Nov 2011 17:55:27 -0400 (AST) Received: from mailout-de.gmx.net ([213.165.64.22]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1RThGQ-0007Fq-Hv for pgsql-bugs@postgresql.org; Thu, 24 Nov 2011 21:55:27 +0000 Received: (qmail invoked by alias); 24 Nov 2011 21:55:14 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.102]) [88.115.218.165] by mail.gmx.net (mp050) with SMTP; 24 Nov 2011 22:55:14 +0100 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX19mF8FriW9mm5E7hk7B/YKUdx+8xkE0qx7O8AT/Wt pOsecgVSbTtYoJ Message-ID: <1322171712.20912.26.camel@vanquo.pezone.net> Subject: Re: BUG #6300: duplicate key value violates unique constraint From: Peter Eisentraut To: Robert Haas Cc: Peter Geoghegan , Tomas Vondra , tigran.mkrtchyan@desy.de, pgsql-bugs@postgresql.org Date: Thu, 24 Nov 2011 23:55:12 +0200 In-Reply-To: References: <201111181642.pAIGgaLY007885@wwwmaster.postgresql.org> <2e0d250ae01ece58a2c387f52f3121fc.squirrel@sq.gransy.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.3-2 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Y-GMX-Trusted: 0 X-Archive-Number: 201111/172 X-Sequence-Number: 31767 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.