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 QAA26198; Sun, 13 Oct 2002 16:25:25 +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 QAA25705 for ; Sun, 13 Oct 2002 16:25:24 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a31.tin.it [62.211.4.31]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9DEPK525889 for ; Sun, 13 Oct 2002 16:25:21 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id BE4902724D; Sun, 13 Oct 2002 16:35:39 +0200 (CEST) Message-ID: <3DA984BB.2060007@baretta.com> Date: Sun, 13 Oct 2002 16:35:39 +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: Chris Hecker , Ocaml Subject: Re: [Caml-list] PostgreSQL and Ocaml References: <4.3.2.7.2.20021011113853.04c03c08@mail.d6.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Chris Hecker wrote: > >> 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. > > > I have no time to help you with this, but I have a suggestion. I would > write this dll in caml and use the asmdynlink library (which, > unfortunately, is bound rather tightly into the apparently-moribund cdk > at this point, but it still appears to work). ... This is an interesting point, but the main nightmare will be tying in PostgreSQL code into Ocaml. You have to consider that PostgreSQL is the SQL engine, and necessarily the embedded-Ocaml interpreter/runtime-system will have to be able to invoke such portions of the PostgreSQL system as are necessary to run queries and retrieve recordsets or to open and use cursors. So, C calls Caml which calls C which... This reminds me of the autogénération de Caml: http://caml.inria.fr/pooh.html 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