Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] PostgreSQL-OCaml 1.0.1
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-30 (12:23)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] PostgreSQL-OCaml 1.0.1
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.


Richard Jones.
Merjis Ltd. - improving website return on investment
NET::FTPSERVER is a full-featured, secure, configurable, database-backed
FTP server written in Perl:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: