Re: [eclipse-clp-users] Python Interface / PostgreSQL/MongoDB

From: Gottfried F. Zojer <>
Date: Wed, 21 Nov 2012 14:03:55 +0000
Hello Kish,

Thanks for your long answer and in essence it answered my questions.
I was well aware that PyCLP and any interface between ECLiPSe and a
database ( in my case PostgreSQL and MongoDB )
are two different things.I will follow your advise and look into the
lib(dbi) see if there is any chance to modify the MySQL
in a way that it works with PostgreSQL or MongoDB.
Personally I mostly use Python and also i discovered ECLiPSe and Constraint
Programming through the PySwip module and one book
from Krzysztof Apt.And now I m in the process to do a assessment of ECLiPSe
and Constraint Programming compared to SWI Prolog
and Prolog ISO standard

Best regards


On Wed, Nov 14, 2012 at 3:01 AM, Kish Shen <> wrote:

> Hi Gottfried,
> I am not sure I understand what you are doing exactly, and there are
> several different issues I am not clear about:
> 1. What exactly do you mean by "the Python Interface"? Do you mean PyCLP,
> Oreste Berbardi's Python interface to ECLiPSe? This is an interface
> developed independently by Oreste, and I don't know much about it, so I
> can't really help you here.
> 2. If you are talking about PyCLP, I don't really understand how this
> relates to providing an interface to PostgreSQL for ECLiPSe. As I
> understand it, PyCLP allows you to call ECLiPSe code (goals) from Python,
> and I assume also for ECLiPSe code to call Phython code. I don't see what
> this has to do with PostgreSQL.
> I took a quick look at the PostgreSQL documentation, and there is
> PL/Python, a server programming interface that allows user functions in
> PostgreSQL to be programmed in Python. However, I don't see how this helps
> you to interface ECLiPSe to PostgreSQL.
> 3. In addition, this interface is for server programming -- extending
> PostgreSQL's SQL. This is not what lib(dbi) -- ECLiPSe's interface to MySQL
> you mentioned -- does. What lib(dbi) does is to use MySQL as a database
> from ECLiPSe, i.e. to send data and SQL query/commands to MySQL, and
> receive data back from MySQL. This is done using the client interface of
> MySQL. PostgreSQL has the equivalent client interface, and like MySQL's,
> the API is for C, and from my very quick look, the API is similar to
> MySQL's.
> So I think that if you want to interface to PostgreSQL (for ECLiPSe) in a
> way similar to what lib(dbi) does with MySQL -- you probably want to start
> with the existing lib(dbi) code and try to adapt the C part of the code to
> use PostgreSQL's API instead of MySQL's. Note that lib(dbi) itself was
> adapted in a similar way from an interface to (a very old version of)
> Oracle. I did this adaption, and I tried to write the C code in such a way
> that adapting the code for another SQL-based database should be relatively
> easy (assuming the API provides similar functionality as MySQL's), but
> unfortunately I don't think there is much implementation documentation for
> this library -- there is oci.txt, which is some brief notes for the old
> Oracle interface, and was what I used when I adapted the code for MySQL.
> Cheers,
> Kish
> On 12/11/2012 17:17, Gottfried F. Zojer wrote:
>> Hello to everyone,
>> I can see within the source-code download that eclipseclp can be linked to
>> Mysql.
>> Just wondering if somebody is using eclipseclp with PostgreSQL via the
>> Python Interface?
>> Unfortunately I m getting error messages when installing the Python
>> Interface ( cython distutils import )
>> Thanks in advance for any feedback
>> Best regards
>> Gottfried
>> ------------------------------**------------------------------**
>> ------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>>**d2d_nov <>
>> ______________________________**_________________
>> ECLiPSe-CLP-Users mailing list
>> ECLiPSe-CLP-Users_at_lists.**<>
Received on Wed Nov 21 2012 - 14:04:06 CET

This archive was generated by hypermail 2.2.0 : Thu Nov 22 2012 - 06:16:22 CET