Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

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