Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f21Muxx06168 for ; Thu, 1 Mar 2001 17:56:59 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id RAA25630; Thu, 1 Mar 2001 17:54:55 -0500 (EST) From: Bruce Momjian Message-Id: <200103012254.RAA25630@candle.pha.pa.us> Subject: Re: JDBC error codes to detect duplicates? In-Reply-To: <003701c0a29c$304b1a00$5a2b7ad8@expertrade.com> "from David Wall at Mar 1, 2001 02:08:47 pm" To: David Wall Date: Thu, 1 Mar 2001 17:54:55 -0500 (EST) CC: Max Khon , Peter Mount , pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200103/13 X-Sequence-Number: 1174 I have ideas on how to do error codes and multiple languages. I can make a proposal for 7.2. [ Charset ISO-8859-1 unsupported, converting... ] > > >AFAIK clean implementation of such feature is not possible because > backend > > >protocol does not have error codes (only error messages) > > > > Thats correct. It's also not practical to get the driver to translate > > because the format of the messages can change between releases as well. > > Practically speaking, how often do the messages really change between > releases? It seems that we could create a pluggable translator that would > work based on the release version. If the messages change too frequently, > then something's seriously wrong with Postgresql server since the main > sql-portion of the system has been in place and there aren't too many things > a program really needs to detect about a database (missing row, duplicate > key, constraint violation, transaction error, deadlock detected, etc.). > > David > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026