blob: d95f2cc1f21f13ace48fac57ceddbe1707ea6531 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001OPTIONAL
2SYNOPSIS
3 #include <pgsql.h>
4
5 int pg_query (string query)
6 int pg_query (string query, int flags)
7
8DESCRIPTION
9 Queue a new query <query> to the database connection on the current
10 object. Return the unique id of the query. The query result itself
11 will be passed as argument to the callback function.
12
13 <flags> can be one of these values:
14 PG_RESULT_ARRAY: Pass the query result as array.
15 PG_RESULT_MAP: Pass the query result as mapping.
16
17 The function is available only if the driver is compiled with
18 PostgreSQL support. In that case, __PGSQL__ is defined.
19
20 The efun triggers a privilege violation ("pgsql", "pg_query").
21
22HISTORY
23 Added in 3.3.445.
24 LDMud 3.3.640 added the privilege violation.
25
26SEE ALSO
27 pgsql(C), pg_connect(E), pg_conv_string(E), pg_pending(E), pg_close(E),
28 privilege_violation(M)