Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] PostgreSQL and Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] PostgreSQL and Ocaml


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