59 lines · 2.1 KB · Text
RawDownload
Interface to the PostgreSQL database server------------------------------------------- This directory provides a C interface to the PostgreSQL relationaldatabase server.  Using this interface, you can communicate with andcontrol this fully-fledged, robust database server from Moscow MLprograms.  The interaction uses the standard query language SQL, whichis not described here.  The many books about relational databasemanagement systems (RDBMS), and the PostgreSQL documentation, describeSQL. If the example fails to compile with the message        ld: cannot open -lcrypt: No such file or directory then try deleting -lcrypt from the libmpq.so line in the Makefile;probably crypt() is defined in the standard C library. The interface consists of the following files:         mpq.c           Implements the dynamic library libmpq.so which                         interfaces Moscow ML to the Postgres libpq library. You must have the following components:                PostgreSQL      Can be found many places on the Internet, such as                        http://www.postgres.org         Postgres        The Moscow ML library interface to the PostgreSQL                        database server.         Dynlib          The Moscow ML foreign (C) function interface.                        Supported for Linux, Solaris, MS Win32, MacOS,	                Digital Unix, and HP-UX The runtime system must be compiled with support for dynamic linkingof foreign functions (edit mosml/src/Makefile.inc to achieve this). 1. Edit the mpq/Makefile to make PGSQLDIR point to the directory in   which you installed PostgreSQL. 2. Compile mpq.c:         make 3. Install libmpq.so in the directory determined by BINDIR in    src/Makefile.inc:         make install 4. Set your LD_LIBRARY_PATH to point to the BINDIR directory.         For tcsh: setenv LD_LIBRARY_PATH $BINDIR        For bash: export LD_LIBRARY_PATH=$BINDIR 5. Test the library:         make test ----------------------------------------------------------------------File mosml/src/dynlibs/mpq/README * sestoft@dina.kvl.dk * 1998-10-29