caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] PostgreSQL and Ocaml
@ 2002-10-11 11:04 Alessandro Baretta
  2002-10-11 11:24 ` Yang Shouxun
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alessandro Baretta @ 2002-10-11 11:04 UTC (permalink / raw)
  To: Ocaml

I have found an excellent client library to access 
PostgreSQL databases from Ocaml applications. This I have 
put to use with excellent results in the development of a 
web application, together with Netcgi. However, most of the 
logic of my program is written and stored in the database as 
sql and pl/pgsql stored procedures. While SQL is overall a 
very good language to express computations in relational 
algebra, it is very weak (pratiquement, c'est nul) in 
general algorithms, so for anything more complex than a 
query one has to resort to pl/pgSQL, which is as powerful as 
an ordinary imperative language with the added bonus of 
having SQL constructs for relational algebra. What it lacks 
is type safety. After having come in contact with OCaml, I 
can hardly live with a language with no type safety.

Now I wonder: has nobody written a PostgreSQL server-side 
binding for Ocaml? I have searched Google on the subject, 
but found nothing relevant.

If nobody has, would anyone like to join me in the project 
of writing an add-in for PostgreSQL supporting Ocaml stored 
procedures? I have little experience in this, but it should 
not be too difficult: it should be a matter of writing a C 
dll which, upon initialization, starts a bytecode compiler 
and interpreter, and has callbacks through with which the 
server can request the compilation of a text string or the 
execution of a bytecode cmo blob. Although I think I might 
succeed by myself, I'd still prefer to work in company, if I 
have to.  :)

Alex

-------------------
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-10-13 14:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-11 11:04 [Caml-list] PostgreSQL and Ocaml Alessandro Baretta
2002-10-11 11:24 ` Yang Shouxun
2002-10-11 12:31   ` Alessandro Baretta
2002-10-11 18:53 ` Chris Hecker
2002-10-13 14:35   ` Alessandro Baretta
2002-10-12 12:05 ` Nicolas Cannasse

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).