OPTIONAL
SYNOPSIS
        #include <pgsql.h>

        int pg_query (string query)
        int pg_query (string query, int flags)

DESCRIPTION
        Queue a new query <query> to the database connection on the current
        object. Return the unique id of the query. The query result itself
        will be passed as argument to the callback function.

        <flags> can be one of these values:
          PG_RESULT_ARRAY: Pass the query result as array.
          PG_RESULT_MAP:   Pass the query result as mapping.

        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_query").

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

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