Received: from mail1.expertrade.com (r87-43-dsl.sea.lightrealm.net [216.122.43.87]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f21MA1x01143 for ; Thu, 1 Mar 2001 17:10:01 -0500 (EST) (envelope-from d.wall@computer.org) Received: from reggae (reggae.expertrade.com [216.122.43.90]) by mail1.expertrade.com (8.9.3/8.9.3) with SMTP id OAA08127; Thu, 1 Mar 2001 14:08:34 -0800 Message-ID: <003701c0a29c$304b1a00$5a2b7ad8@expertrade.com> Reply-To: "David Wall" From: "David Wall" To: "Max Khon" , "Peter Mount" Cc: References: <017801c0a27c$4b0902a0$5a2b7ad8@expertrade.com> <5.0.2.1.0.20010301210608.0222ab40@mail.retep.org.uk> Subject: Re: JDBC error codes to detect duplicates? Date: Thu, 1 Mar 2001 14:08:47 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200103/12 X-Sequence-Number: 1173 > >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