• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..28-Aug-2014-

MakefileH A D28-Aug-20141.5 KiB6230

READMEH A D28-Aug-20142.1 KiB6040

mpq.cH A D28-Aug-201410.3 KiB398277

result.okH A D28-Aug-20145.5 KiB147146

testpsql.smlH A D28-Aug-20148.6 KiB290227

README

1Interface to the PostgreSQL database server
2-------------------------------------------
3
4This directory provides a C interface to the PostgreSQL relational
5database server.  Using this interface, you can communicate with and
6control this fully-fledged, robust database server from Moscow ML
7programs.  The interaction uses the standard query language SQL, which
8is not described here.  The many books about relational database
9management systems (RDBMS), and the PostgreSQL documentation, describe
10SQL.
11
12If the example fails to compile with the message
13        ld: cannot open -lcrypt: No such file or directory
14then try deleting -lcrypt from the libmpq.so line in the Makefile;
15probably crypt() is defined in the standard C library.
16
17The interface consists of the following files:
18
19        mpq.c           Implements the dynamic library libmpq.so which
20                        interfaces Moscow ML to the Postgres libpq library.
21
22You must have the following components:
23
24        PostgreSQL      Can be found many places on the Internet, such as
25                        http://www.postgres.org
26
27        Postgres        The Moscow ML library interface to the PostgreSQL
28                        database server.
29
30        Dynlib          The Moscow ML foreign (C) function interface.
31                        Supported for Linux, Solaris, MS Win32, MacOS,
32	                Digital Unix, and HP-UX
33
34The runtime system must be compiled with support for dynamic linking
35of foreign functions (edit mosml/src/Makefile.inc to achieve this).
36
371. Edit the mpq/Makefile to make PGSQLDIR point to the directory in
38   which you installed PostgreSQL.
39
402. Compile mpq.c:
41
42        make
43
443. Install libmpq.so in the directory determined by BINDIR in
45   src/Makefile.inc:
46
47        make install
48
494. Set your LD_LIBRARY_PATH to point to the BINDIR directory.
50
51        For tcsh: setenv LD_LIBRARY_PATH $BINDIR
52        For bash: export LD_LIBRARY_PATH=$BINDIR
53
545. Test the library:
55
56        make test
57
58----------------------------------------------------------------------
59File mosml/src/dynlibs/mpq/README * sestoft@dina.kvl.dk * 1998-10-29
60