I've written a little C mex file for MATLAB to interface to the my
PostgreSQL database. Currently, I have a compiled version for SGI IRIX
6.5.4, but I think this should be simple enough to port to any machine.

Currently, the mex file just brings data back as ASCII. I hope to
eventually add some ability for binary cursors and possibly even
lower-level functions like PQexec and PQntuples. But considering my list
of things to do that may take a while.

I've tried to compile it for Linux, however MATLAB was compiled on Linux
4.2 and so the mex compiler won't work properly under my RH 6.0. There
is a workaround by getting the version 5.0 C libraries for Linux and
compiling it with them. However, I am hoping that the Mathworks will
eventually compile the program on 6.0 so that I don't have to do the
workaround.

I hope people get some use out of it. Let me know if you find ways to
improve it. I think it would be a nice little interface to add to the
PostgreSQL distribution someday.

-Tony
Mon, 04 Oct 1999 11:59:32 -0700
"G. Anthony Reina" <reina@nsi.edu>
MATLAB mex file for PostgreSQL
> I've written a little C mex file for MATLAB to interface to the my
> PostgreSQL database.

I'll add it to the contrib area, unless someone else beats me to it.
Thanks.

                - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Tue, 05 Oct 1999 01:48:43 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: [HACKERS] MATLAB mex file for PostgreSQL