caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Benjamin Geer <ben@socialtools.net>
To: Richard Jones <rich@annexia.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] PostgreSQL-OCaml 1.0.1
Date: Fri, 30 Jan 2004 12:43:24 +0000	[thread overview]
Message-ID: <401A516C.1060705@socialtools.net> (raw)
In-Reply-To: <20040130122311.GA29288@redhat.com>

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


  parent reply	other threads:[~2004-01-30 12:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-30 12:02 Richard Jones
2004-01-30 12:15 ` Benjamin Geer
2004-01-30 12:23   ` Richard Jones
2004-01-30 12:30     ` Richard Jones
2004-01-30 12:43     ` Benjamin Geer [this message]
2004-01-30 12:56     ` Benjamin Geer
2004-01-30 13:22       ` Richard Jones
  -- strict thread matches above, loose matches on Subject: below --
2004-01-28 18:32 Markus Mottl
2004-01-28 22:44 ` Stefano Zacchiroli
2004-01-28 23:21   ` Markus Mottl
2004-01-29  9:38     ` Sven Luther
2004-01-29 18:18     ` Alain.Frisch
2004-01-29 20:06       ` Richard Jones
2004-01-29 23:36         ` Markus Mottl
2004-01-30  5:50         ` Josh Burdick
2004-01-30  7:37           ` Shawn Wagner
2004-01-30  8:21           ` Vitaly Lugovsky
2004-01-30 10:24             ` Benjamin Geer
2004-01-30 10:47               ` Richard Jones
2004-01-30 14:58                 ` Gerd Stolpmann
2004-01-30 15:46                   ` Richard Jones
2004-01-30 11:14               ` Markus Mottl
2004-01-30 11:25               ` Vitaly Lugovsky
2004-01-30 11:41                 ` Benjamin Geer
2004-01-30 16:44               ` Alex Baretta
2004-01-30 16:49                 ` Benjamin Geer
2004-01-30  8:23           ` Alain.Frisch
2004-02-01 21:03   ` Alain.Frisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=401A516C.1060705@socialtools.net \
    --to=ben@socialtools.net \
    --cc=caml-list@inria.fr \
    --cc=rich@annexia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).