From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA17060; Fri, 30 Jan 2004 13:43:27 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA16992 for ; Fri, 30 Jan 2004 13:43:26 +0100 (MET) Received: from rabelais.socialtools.net (rabelais.socialtools.net [81.2.94.243]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id i0UChQv00251 for ; Fri, 30 Jan 2004 13:43:26 +0100 (MET) Received: by rabelais.socialtools.net (Postfix, from userid 108) id 105D123341; Fri, 30 Jan 2004 12:43:26 +0000 (GMT) Received: from socialtools.net (chaucer.socialtools.net [81.2.94.242]) by rabelais.socialtools.net (Postfix) with ESMTP id AED172332A; Fri, 30 Jan 2004 12:43:24 +0000 (GMT) Message-ID: <401A516C.1060705@socialtools.net> Date: Fri, 30 Jan 2004 12:43:24 +0000 From: Benjamin Geer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-gb, en, fr, it MIME-Version: 1.0 To: Richard Jones Cc: caml-list@inria.fr Subject: Re: [Caml-list] PostgreSQL-OCaml 1.0.1 References: <20040130120206.GA28458@redhat.com> <401A4AD9.2060509@socialtools.net> <20040130122311.GA29288@redhat.com> In-Reply-To: <20040130122311.GA29288@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on rabelais.socialtools.net X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 1.0.1:01 caml's:01 dbi:99 dbi:99 banks:99 pope:99 bank:98 handles:01 exception:02 exception:02 string:03 string:03 wrote:03 perl:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Richard Jones wrote: > It throws Sql_error when it can determine an error. I'm not very > familiar with JDBC, except that I know a lot of people don't like it. > mod_caml's Dbi is much more closely related to Perl DBI, as you might > have guessed. If the exception string just contains whatever error message the database produced, the application will have to parse the string to find out what went wrong. And since different databases produce different error messages, this removes some of the benefit of having an DBI layer in the first place. So it would be nice to have something like this: type sql_error_type = Invalid_sql | Lost_connection | Deadlock | Other ;; exception SQL_error of sql_error_type * string ;; It might be a good idea to have a look at the error codes returned by Oracle, DB2 and SQL Server, and try to come up with some reasonable vendor-neutral codes for the DBI layer. >>Can it handle >>BLOBs and CLOBs? > > Since we use PostgreSQL for everything at Merjis, we use the 'text' > and 'byte' types which are much more useful and flexible than BLOBs. > So there's no specific support, although it wouldn't be too hard to > add it. I've no idea how Perl DBI handles BLOBs either, A friend of mine who has been working with Perl DBI and Microsoft SQL Server says it doesn't seem to handle them at all. > since all the > databases I've ever used with it have had proper unlimited length text > types, so there's no need for them. PostgreSQL and MySQL are great databases, but all the banks we work with are very attached to either Oracle, DB2 or SQL Server, so it's essential for us to support those databases. (Asking a bank to switch to a different database vendor is like asking the Pope to convert to another religion...) Ben ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners