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 NAA16277; Fri, 30 Jan 2004 13:23:14 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA16869 for ; Fri, 30 Jan 2004 13:23:12 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0UCNCP14205 for ; Fri, 30 Jan 2004 13:23:12 +0100 (MET) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1AmXfz-0007nL-00; Fri, 30 Jan 2004 12:23:11 +0000 Date: Fri, 30 Jan 2004 12:23:11 +0000 To: Benjamin Geer Cc: caml-list@inria.fr Subject: Re: [Caml-list] PostgreSQL-OCaml 1.0.1 Message-ID: <20040130122311.GA29288@redhat.com> References: <20040130120206.GA28458@redhat.com> <401A4AD9.2060509@socialtools.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <401A4AD9.2060509@socialtools.net> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 1.0.1:01 2004:99 dbi:99 caml's:01 dbi:99 ltd:98 caml:01 handles:01 distinguish:01 exception:02 wrote:03 wrote:03 annoying:03 perl:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, Jan 30, 2004 at 12:15:21PM +0000, Benjamin Geer wrote: > Richard Jones wrote: > >mod_caml contains a Dbi layer which does all that. For example, see a > >random piece of code which I wrote yesterday attached to the end of > >this message. > > Looks about right to me. How does it handle errors? (Does it always > throw the same exception, regardless of the type of error? One of the > things that's annoying about JDBC is that it doesn't distinguish between > invalid SQL, lost database connectons, deadlocks, etc.) 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. > 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, since all the databases I've ever used with it have had proper unlimited length text types, so there's no need for them. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment NET::FTPSERVER is a full-featured, secure, configurable, database-backed FTP server written in Perl: http://www.annexia.org/freeware/netftpserver/ ------------------- 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