ldmud-3.4.1/doc/
ldmud-3.4.1/doc/efun.de/
ldmud-3.4.1/doc/efun/
ldmud-3.4.1/doc/man/
ldmud-3.4.1/doc/other/
ldmud-3.4.1/mud/
ldmud-3.4.1/mud/heaven7/
ldmud-3.4.1/mud/lp-245/
ldmud-3.4.1/mud/lp-245/banish/
ldmud-3.4.1/mud/lp-245/doc/
ldmud-3.4.1/mud/lp-245/doc/examples/
ldmud-3.4.1/mud/lp-245/doc/sefun/
ldmud-3.4.1/mud/lp-245/log/
ldmud-3.4.1/mud/lp-245/obj/Go/
ldmud-3.4.1/mud/lp-245/players/lars/
ldmud-3.4.1/mud/lp-245/room/death/
ldmud-3.4.1/mud/lp-245/room/maze1/
ldmud-3.4.1/mud/lp-245/room/sub/
ldmud-3.4.1/mud/lp-245/secure/
ldmud-3.4.1/mud/morgengrauen/
ldmud-3.4.1/mud/morgengrauen/lib/
ldmud-3.4.1/mud/sticklib/
ldmud-3.4.1/mud/sticklib/src/
ldmud-3.4.1/mudlib/uni-crasher/
ldmud-3.4.1/pkg/
ldmud-3.4.1/pkg/debugger/
ldmud-3.4.1/pkg/diff/
ldmud-3.4.1/pkg/misc/
ldmud-3.4.1/src/autoconf/
ldmud-3.4.1/src/hosts/
ldmud-3.4.1/src/hosts/GnuWin32/
ldmud-3.4.1/src/hosts/amiga/
ldmud-3.4.1/src/hosts/win32/
ldmud-3.4.1/src/ptmalloc/
ldmud-3.4.1/src/util/
ldmud-3.4.1/src/util/erq/
ldmud-3.4.1/src/util/indent/hosts/next/
ldmud-3.4.1/src/util/xerq/
ldmud-3.4.1/src/util/xerq/lpc/
ldmud-3.4.1/src/util/xerq/lpc/www/
ldmud-3.4.1/test/t-030925/
ldmud-3.4.1/test/t-040413/
ldmud-3.4.1/test/t-041124/
OPTIONAL
SYNOPSIS
        int pg_connect (string conn, string fun)
        int pg_connect (string conn, string fun, string|object obj, mixed extra, ...)
        int pg_connect (string conn, closure cl, mixed extra, ...)

DESCRIPTION
        Open a database connection as directed by <conn>, and assign the
        callback function <fun>/<cl> with the optional <extra> parameters
        to it.

        The object holding the callback function becomes the controlling
        object; obiously it is an error to assign more than one connection
        to the same controlling object.

        The <conn> string is in the format accepted by Postgres'
        PQconnectStart() API functions. Pass an empty string to use the
        default options, or a string holding the '<key>=<value>' options
        separated by whitespace.
        
        The most useful options are:
          dbname:   The database name
          user:     The user name to connect as.
          password: Password to be used.

        Return 0 on success, and -1 on failure.

        The function is available only if the driver is compiled with
        PostgreSQL support. In that case, __PGSQL__ is defined.

        The efun triggers a privilege violation ("pgsql", "pg_connect").

HISTORY
        Added in 3.3.445.
        LDMud 3.3.640 added the privilege violation.

SEE ALSO
        pgsql(C), pg_query(E), pg_pending(E), pg_conv_string(E), pg_close(E),
        privilege_violation(M)