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 MAA28102; Fri, 11 Oct 2002 12:54:28 +0200 (MET DST) 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 MAA30108 for ; Fri, 11 Oct 2002 12:54:28 +0200 (MET DST) Received: from athlon.baretta.com (host94-68.pool80116.interbusiness.it [80.116.68.94]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9BAsO508768 for ; Fri, 11 Oct 2002 12:54:27 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 8BD25273AE for ; Fri, 11 Oct 2002 13:04:46 +0200 (CEST) Message-ID: <3DA6B04E.1090900@baretta.com> Date: Fri, 11 Oct 2002 13:04:46 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: it, en MIME-Version: 1.0 To: Ocaml Subject: [Caml-list] PostgreSQL and Ocaml Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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